From d97d86757929b9bc329c91986c497c35a8edc9fa Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 14 Sep 2016 17:03:21 +0200 Subject: [PATCH] README.md: add newlines --- README.md | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 21e8258..6cdb580 100644 --- a/README.md +++ b/README.md @@ -77,16 +77,14 @@ is assumed. A nonce **must** be used only once. Either only one VK_pub is announced per MVK ever and nonce is missing, or for every MVK announcement, the nonce has to be **unique** or **true random** bytes. -``` -sharedkey = sha256(sha256(MVK_pub | nonce)) -xornonce[24] = sha256(sharedkey | nonce)[0:24] +sharedkey = sha256(sha256(MVK_pub | nonce)) +xornonce[24] = sha256(sharedkey | nonce)[0:24] -sig[64] = crypto_sign(VK_pub, MKV) -msg[96] = VK_pub || sig -cipher[96] = crypto_stream_xor(msg, xornonce, sharedkey) -``` +sig[64] = crypto_sign(VK_pub, MKV) +msg[96] = VK_pub || sig +cipher[96] = crypto_stream_xor(msg, xornonce, sharedkey) -clients may flush T1, if T2 does not follow in the next 20 blocks +clients may flush T1, if T2 does not follow in the next 20 blocks clients may flush T2, if T1 does not follow in the next 20 blocks | | OP | Chunk1 | Chunk2 | Chunk3 | @@ -97,16 +95,14 @@ clients may flush T2, if T1 does not follow in the next 20 blocks | Size | 1 | 3 | 49 | 13 | ### MVK announce next subkey VK_n+1 0xECA[3,4] - A-nnounce -``` -sharedkey = sha256(sha256(VK_n_pub)) -nonce[24] = sha256(sharedkey)[0:24] +sharedkey = sha256(sha256(VK_n_pub)) +nonce[24] = sha256(sharedkey)[0:24] -sig[64] = crypto_sign(VK_n+1_pub, MKV) -msg[96] = VK_n+1_pub || sig +sig[64] = crypto_sign(VK_n+1_pub, MKV) +msg[96] = VK_n+1_pub || sig cipher[96] = crypto_stream_xor(msg, nonce, sharedkey) -``` -clients may flush T1, if T2 does not follow in the next 20 blocks +clients may flush T1, if T2 does not follow in the next 20 blocks clients may flush T2, if T1 does not follow in the next 20 blocks | | OP | Chunk1 | Chunk2 | Chunk3 | Chunk4 | @@ -117,12 +113,10 @@ clients may flush T2, if T1 does not follow in the next 20 blocks | Size | 1 | 3 | 49 | 13 | 13 | ### Public Doc or other key OK sign 0xEC5[1,2] -``` -sign[64] = Sign_Key('Sign ' || sha256(Doc/OK)) +sign[64] = Sign_Key('Sign ' || sha256(Doc/OK)) data = optional data (max 2*19 bytes) -``` -clients may flush T1, if T2 does not follow in the next 20 blocks +clients may flush T1, if T2 does not follow in the next 20 blocks clients may flush T2, if T1 does not follow in the next 20 blocks | | OP | Chunk1 | Chunk2 | Chunk3 | Chunk4 |