diff options
Diffstat (limited to 'src/lib/libcrypto/cmac/cmac.c')
| -rw-r--r-- | src/lib/libcrypto/cmac/cmac.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/lib/libcrypto/cmac/cmac.c b/src/lib/libcrypto/cmac/cmac.c index 81d6ffc9b5..7ad3434836 100644 --- a/src/lib/libcrypto/cmac/cmac.c +++ b/src/lib/libcrypto/cmac/cmac.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cmac.c,v 1.22 2024/01/30 17:43:39 tb Exp $ */ | 1 | /* $OpenBSD: cmac.c,v 1.23 2024/03/02 09:30:21 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project. | 3 | * project. |
| 4 | */ | 4 | */ |
| @@ -323,18 +323,3 @@ CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen) | |||
| 323 | return 1; | 323 | return 1; |
| 324 | } | 324 | } |
| 325 | LCRYPTO_ALIAS(CMAC_Final); | 325 | LCRYPTO_ALIAS(CMAC_Final); |
| 326 | |||
| 327 | int | ||
| 328 | CMAC_resume(CMAC_CTX *ctx) | ||
| 329 | { | ||
| 330 | if (ctx->nlast_block == -1) | ||
| 331 | return 0; | ||
| 332 | /* The buffer "tbl" containes the last fully encrypted block | ||
| 333 | * which is the last IV (or all zeroes if no last encrypted block). | ||
| 334 | * The last block has not been modified since CMAC_final(). | ||
| 335 | * So reinitialising using the last decrypted block will allow | ||
| 336 | * CMAC to continue after calling CMAC_Final(). | ||
| 337 | */ | ||
| 338 | return EVP_EncryptInit_ex(ctx->cipher_ctx, NULL, NULL, NULL, ctx->tbl); | ||
| 339 | } | ||
| 340 | LCRYPTO_ALIAS(CMAC_resume); | ||
