diff options
| author | tb <> | 2018-09-15 19:09:07 +0000 |
|---|---|---|
| committer | tb <> | 2018-09-15 19:09:07 +0000 |
| commit | 7e0e5259b21e1e4717aecffec84ee32f0cdc0b02 (patch) | |
| tree | fd61fe11bc316af402dac16cc0083ffd425f1d85 | |
| parent | 237c42869fa63acc2b13ff7d4c25c00b297dc71f (diff) | |
| download | openbsd-7e0e5259b21e1e4717aecffec84ee32f0cdc0b02.tar.gz openbsd-7e0e5259b21e1e4717aecffec84ee32f0cdc0b02.tar.bz2 openbsd-7e0e5259b21e1e4717aecffec84ee32f0cdc0b02.zip | |
rename checkChaCha20Poly1305{Open,Seal}() into checkAead{Open,Seal}().
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libcrypto/wycheproof/wycheproof.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index dfbc721076..77011ef616 100644 --- a/src/regress/lib/libcrypto/wycheproof/wycheproof.go +++ b/src/regress/lib/libcrypto/wycheproof/wycheproof.go | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: wycheproof.go,v 1.48 2018/09/15 19:06:47 tb Exp $ */ | 1 | /* $OpenBSD: wycheproof.go,v 1.49 2018/09/15 19:09:07 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
| @@ -772,7 +772,7 @@ func runAesCmacTestGroup(algorithm string, wtg *wycheproofTestGroupAesCmac) bool | |||
| 772 | return success | 772 | return success |
| 773 | } | 773 | } |
| 774 | 774 | ||
| 775 | func checkChaCha20Poly1305Open(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad []byte, aadLen int, msg []byte, msgLen int, ct []byte, ctLen int, tag []byte, tagLen int, wt *wycheproofTestAead) bool { | 775 | func checkAeadOpen(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad []byte, aadLen int, msg []byte, msgLen int, ct []byte, ctLen int, tag []byte, tagLen int, wt *wycheproofTestAead) bool { |
| 776 | maxOutLen := ctLen + tagLen | 776 | maxOutLen := ctLen + tagLen |
| 777 | 777 | ||
| 778 | opened := make([]byte, maxOutLen) | 778 | opened := make([]byte, maxOutLen) |
| @@ -808,7 +808,7 @@ func checkChaCha20Poly1305Open(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad [] | |||
| 808 | return success | 808 | return success |
| 809 | } | 809 | } |
| 810 | 810 | ||
| 811 | func checkChaCha20Poly1305Seal(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad []byte, aadLen int, msg []byte, msgLen int, ct []byte, ctLen int, tag []byte, tagLen int, wt *wycheproofTestAead) bool { | 811 | func checkAeadSeal(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad []byte, aadLen int, msg []byte, msgLen int, ct []byte, ctLen int, tag []byte, tagLen int, wt *wycheproofTestAead) bool { |
| 812 | maxOutLen := msgLen + tagLen | 812 | maxOutLen := msgLen + tagLen |
| 813 | 813 | ||
| 814 | sealed := make([]byte, maxOutLen) | 814 | sealed := make([]byte, maxOutLen) |
| @@ -897,8 +897,8 @@ func runChaCha20Poly1305Test(iv_len int, key_len int, tag_len int, wt *wycheproo | |||
| 897 | } | 897 | } |
| 898 | defer C.EVP_AEAD_CTX_cleanup(&ctx) | 898 | defer C.EVP_AEAD_CTX_cleanup(&ctx) |
| 899 | 899 | ||
| 900 | openSuccess := checkChaCha20Poly1305Open(&ctx, iv, ivLen, aad, aadLen, msg, msgLen, ct, ctLen, tag, tagLen, wt) | 900 | openSuccess := checkAeadOpen(&ctx, iv, ivLen, aad, aadLen, msg, msgLen, ct, ctLen, tag, tagLen, wt) |
| 901 | sealSuccess := checkChaCha20Poly1305Seal(&ctx, iv, ivLen, aad, aadLen, msg, msgLen, ct, ctLen, tag, tagLen, wt) | 901 | sealSuccess := checkAeadSeal(&ctx, iv, ivLen, aad, aadLen, msg, msgLen, ct, ctLen, tag, tagLen, wt) |
| 902 | 902 | ||
| 903 | return openSuccess && sealSuccess | 903 | return openSuccess && sealSuccess |
| 904 | } | 904 | } |
