diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-01-12 20:16:38 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-01-12 20:16:38 +0100 |
commit | 2e23780d2f4f1e3a55a096227a01995d0f0c2e52 (patch) | |
tree | 2f023d4aa9ba3ed49e1aada021203efb89b671a5 /sys/man/2 | |
parent | 47f07b2669e74eb957db56befa2237df5afa8474 (diff) |
libsec: implement extended 192-bit nonce xchacha variant and hchacha function
Diffstat (limited to 'sys/man/2')
-rw-r--r-- | sys/man/2/chacha | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/man/2/chacha b/sys/man/2/chacha index b339e9dc0..21ce09ea0 100644 --- a/sys/man/2/chacha +++ b/sys/man/2/chacha @@ -1,6 +1,6 @@ .TH CHACHA 2 .SH NAME -setupChachastate, chacha_setblock, chacha_setiv, chacha_encrypt, chacha_encrypt2, ccpoly_encrypt, ccpoly_decrypt \- chacha encryption +setupChachastate, chacha_setblock, chacha_setiv, chacha_encrypt, chacha_encrypt2, hchacha, ccpoly_encrypt, ccpoly_decrypt \- chacha encryption .SH SYNOPSIS .B #include <u.h> .br @@ -24,6 +24,9 @@ void chacha_setblock(Chachastate *s, u64int blockno) void chacha_setiv(Chachastate *s, uchar *iv); .PP .B +void hchacha(uchar h[32], uchar *key, ulong keylen, uchar nonce[16], int rounds); +.PP +.B void ccpoly_encrypt(uchar *dat, ulong ndat, uchar *aad, ulong naad, uchar tag[16], Chachastate *cs); .PP .B @@ -49,8 +52,11 @@ a or nonce of .I ivlen bytes (can be -.BR ChachaIVlen =12 -or 8, set to all zeros if the +.BR ChachaIVlen =12 , +.B 8 +or +.BR XChachaIVlen =24 ; +set to all zeros if the .I iv argument is nil), and the number of @@ -94,6 +100,10 @@ allowing seeking in an encrypted stream. sets the the initialization vector (nonce) to .IR iv . .PP +.I Hchacha +is a key expansion function that takes a 128 or 256-bit key +and a 128-bit nonce and produces a new 256-bit key. +.PP .I Ccpoly_encrypt and .I ccpoly_decrypt |