diff options
author | Stephan Mueller <smueller@chronox.de> | 2015-08-03 03:08:05 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-08-04 05:41:33 -0400 |
commit | f6e45c24f401f3d0e648bfba304c83b64d763559 (patch) | |
tree | e7683ebfea775e14897211d9cfe96126f37761af /include/crypto | |
parent | 327cbbabfb77c321fb9f21068c18e6bb951d07a7 (diff) |
crypto: doc - AEAD API conversion
The AEAD API changes are now reflected in the crypto API doc book.
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/aead.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/crypto/aead.h b/include/crypto/aead.h index 7169ad04acc0..14e35364cdfa 100644 --- a/include/crypto/aead.h +++ b/include/crypto/aead.h | |||
@@ -45,6 +45,30 @@ | |||
45 | * a breach in the integrity of the message. In essence, that -EBADMSG error | 45 | * a breach in the integrity of the message. In essence, that -EBADMSG error |
46 | * code is the key bonus an AEAD cipher has over "standard" block chaining | 46 | * code is the key bonus an AEAD cipher has over "standard" block chaining |
47 | * modes. | 47 | * modes. |
48 | * | ||
49 | * Memory Structure: | ||
50 | * | ||
51 | * To support the needs of the most prominent user of AEAD ciphers, namely | ||
52 | * IPSEC, the AEAD ciphers have a special memory layout the caller must adhere | ||
53 | * to. | ||
54 | * | ||
55 | * The scatter list pointing to the input data must contain: | ||
56 | * | ||
57 | * * for RFC4106 ciphers, the concatenation of | ||
58 | * associated authentication data || IV || plaintext or ciphertext. Note, the | ||
59 | * same IV (buffer) is also set with the aead_request_set_crypt call. Note, | ||
60 | * the API call of aead_request_set_ad must provide the length of the AAD and | ||
61 | * the IV. The API call of aead_request_set_crypt only points to the size of | ||
62 | * the input plaintext or ciphertext. | ||
63 | * | ||
64 | * * for "normal" AEAD ciphers, the concatenation of | ||
65 | * associated authentication data || plaintext or ciphertext. | ||
66 | * | ||
67 | * It is important to note that if multiple scatter gather list entries form | ||
68 | * the input data mentioned above, the first entry must not point to a NULL | ||
69 | * buffer. If there is any potential where the AAD buffer can be NULL, the | ||
70 | * calling code must contain a precaution to ensure that this does not result | ||
71 | * in the first scatter gather list entry pointing to a NULL buffer. | ||
48 | */ | 72 | */ |
49 | 73 | ||
50 | /** | 74 | /** |