summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2018-09-15 19:09:07 +0000
committertb <>2018-09-15 19:09:07 +0000
commitd1d7a16f1d9316eec6984c7bd8634012129bd4a2 (patch)
treefd61fe11bc316af402dac16cc0083ffd425f1d85 /src
parent3c78983c729cffaa2df5a133997735ce4d9c073b (diff)
downloadopenbsd-d1d7a16f1d9316eec6984c7bd8634012129bd4a2.tar.gz
openbsd-d1d7a16f1d9316eec6984c7bd8634012129bd4a2.tar.bz2
openbsd-d1d7a16f1d9316eec6984c7bd8634012129bd4a2.zip
rename checkChaCha20Poly1305{Open,Seal}() into checkAead{Open,Seal}().
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/wycheproof/wycheproof.go10
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
775func 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 { 775func 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
811func 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 { 811func 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}