wrap128.c: Fix Doxygen comments

Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
This commit is contained in:
Richard Godbee 2015-03-13 20:54:39 -07:00 committed by Dr. Stephen Henson
parent 3c381e5423
commit 1062ecfc53

View File

@ -127,7 +127,7 @@ size_t CRYPTO_128_wrap(void *key, const unsigned char *iv,
} }
/** Unwrapping according to RFC 3394 section 2.2.2 steps 1-2. /** Unwrapping according to RFC 3394 section 2.2.2 steps 1-2.
* IV check (step 3) is responsibility of the caller. * The IV check (step 3) is responsibility of the caller.
* *
* @param[in] key Key value. * @param[in] key Key value.
* @param[out] iv Unchecked IV value. Minimal buffer length = 8 bytes. * @param[out] iv Unchecked IV value. Minimal buffer length = 8 bytes.
@ -135,11 +135,11 @@ size_t CRYPTO_128_wrap(void *key, const unsigned char *iv,
* Minimal buffer length = (inlen - 8) bytes. * Minimal buffer length = (inlen - 8) bytes.
* Input and output buffers can overlap if block function * Input and output buffers can overlap if block function
* supports that. * supports that.
* @param[in] in Ciphertext text as n 64-bit blocks * @param[in] in Ciphertext as n 64-bit blocks.
* @param[in] inlen Length of in. * @param[in] inlen Length of in.
* @param[in] block Block processing function. * @param[in] block Block processing function.
* @return 0 if inlen is out of range [24, CRYPTO128_WRAP_MAX] * @return 0 if inlen is out of range [24, CRYPTO128_WRAP_MAX]
* or if inlen is not multiply of 8. * or if inlen is not a multiple of 8.
* Output length otherwise. * Output length otherwise.
*/ */
static size_t crypto_128_unwrap_raw(void *key, unsigned char *iv, static size_t crypto_128_unwrap_raw(void *key, unsigned char *iv,
@ -174,21 +174,22 @@ static size_t crypto_128_unwrap_raw(void *key, unsigned char *iv,
return inlen; return inlen;
} }
/** Unwrapping according to RFC 3394 section 2.2.2 including IV check. /** Unwrapping according to RFC 3394 section 2.2.2, including the IV check.
* First block of plain text have to match supplied IV otherwise an error is * The first block of plaintext has to match the supplied IV, otherwise an
* returned. * error is returned.
* *
* @param[in] key Key value. * @param[in] key Key value.
* @param[out] iv Unchecked IV value. Minimal buffer length = 8 bytes. * @param[out] iv IV value to match against. Length = 8 bytes.
* NULL = use default_iv.
* @param[out] out Plaintext without IV. * @param[out] out Plaintext without IV.
* Minimal buffer length = (inlen - 8) bytes. * Minimal buffer length = (inlen - 8) bytes.
* Input and output buffers can overlap if block function * Input and output buffers can overlap if block function
* supports that. * supports that.
* @param[in] in Ciphertext text as n 64-bit blocks * @param[in] in Ciphertext as n 64-bit blocks.
* @param[in] inlen Length of in. * @param[in] inlen Length of in.
* @param[in] block Block processing function. * @param[in] block Block processing function.
* @return 0 if inlen is out of range [24, CRYPTO128_WRAP_MAX] * @return 0 if inlen is out of range [24, CRYPTO128_WRAP_MAX]
* or if inlen is not multiply of 8 * or if inlen is not a multiple of 8
* or if IV doesn't match expected value. * or if IV doesn't match expected value.
* Output length otherwise. * Output length otherwise.
*/ */
@ -285,11 +286,11 @@ size_t CRYPTO_128_wrap_pad(void *key, const unsigned char *icv,
* @param[out] out Plaintext. Minimal buffer length = inlen bytes. * @param[out] out Plaintext. Minimal buffer length = inlen bytes.
* Input and output buffers can overlap if block function * Input and output buffers can overlap if block function
* supports that. * supports that.
* @param[in] in Ciphertext text as n 64-bit blocks * @param[in] in Ciphertext as n 64-bit blocks.
* @param[in] inlen Length of in. * @param[in] inlen Length of in.
* @param[in] block Block processing function. * @param[in] block Block processing function.
* @return 0 if inlen is out of range [16, CRYPTO128_WRAP_MAX], * @return 0 if inlen is out of range [16, CRYPTO128_WRAP_MAX],
* or if inlen is not multiply of 8 * or if inlen is not a multiple of 8
* or if IV and message length indicator doesn't match. * or if IV and message length indicator doesn't match.
* Output length if unwrapping succeeded and IV matches. * Output length if unwrapping succeeded and IV matches.
*/ */