Skip to content

Conversation

@andrewhop
Copy link
Contributor

@andrewhop andrewhop commented Aug 2, 2023

Issues:

Addresses CryptoAlg-1976

Description of changes:

The prefix build automatically finds symbols to prefix and adds them to boringssl_prefix_symbols.h, this change updates Kyber to follow that happy path instead of manually constructing the prefix mapping.

Call-outs:

This shouldn't have any behavior change.

Testing:

Built the static and shared library and looked at the symbols:

nm crypto/libcrypto.a | grep kyber
0000000000000a74 T _aws_lc_pqcrystals_kyber_fips202_ref_sha3_256
0000000000001cc0 T _aws_lc_pqcrystals_kyber_fips202_ref_sha3_512
000000000000092c T _aws_lc_pqcrystals_kyber_fips202_ref_shake128
000000000000007c T _aws_lc_pqcrystals_kyber_fips202_ref_shake128_absorb
0000000000000474 T _aws_lc_pqcrystals_kyber_fips202_ref_shake128_absorb_once
crypto/libcrypto.a(kem_kyber.c.o):
0000000000000188 T _aws_lc_kyber1024r3_decapsulate
0000000000000154 T _aws_lc_kyber1024r3_encapsulate
0000000000000128 T _aws_lc_kyber1024r3_keypair
....
nm crypto/libcrypto.dylib | grep kyber
0000000000060c84 t _aws_lc_pqcrystals_kyber_fips202_ref_sha3_256
0000000000061ed0 t _aws_lc_pqcrystals_kyber_fips202_ref_sha3_512
0000000000060b3c t _aws_lc_pqcrystals_kyber_fips202_ref_shake128
000000000006028c t _aws_lc_pqcrystals_kyber_fips202_ref_shake128_absorb
0000000000060684 t _aws_lc_pqcrystals_kyber_fips202_ref_shake128_absorb_once
.....
00000000001ce0f0 s _aws_lc_kem_kyber1024r3_method
00000000001ce0c0 s _aws_lc_kem_kyber512r3_method
00000000001ce0d8 s _aws_lc_kem_kyber768r3_method
0000000000062198 t _aws_lc_kyber1024r3_decapsulate
0000000000062164 t _aws_lc_kyber1024r3_encapsulate
.....
00000000000620a4 t _aws_lc_kyber768r3_keypair
000000000005f438 t _aws_lc_pqcrystals_kyber1024_ref_barrett_reduce
000000000005f48c t _aws_lc_pqcrystals_kyber1024_ref_basemul
000000000005f03c t _aws_lc_pqcrystals_kyber1024_ref_cmov
000000000005ee48 t _aws_lc_pqcrystals_kyber1024_ref_dec

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@andrewhop andrewhop requested a review from a team as a code owner August 2, 2023 00:32
@nebeid
Copy link
Contributor

nebeid commented Aug 2, 2023

Is the repeated _aws_lc in the fips202 names intended?
Are the lists in the PR description identical before and after this PR?

@andrewhop
Copy link
Contributor Author

Is the repeated _aws_lc in the fips202 names intended? Are the lists in the PR description identical before and after this PR?

They are not intended, let me check the before.

@andrewhop andrewhop requested a review from dkostic August 7, 2023 22:28
@andrewhop andrewhop merged commit 754a124 into aws:main Aug 9, 2023
skmcgrail pushed a commit to skmcgrail/aws-lc that referenced this pull request Sep 14, 2023
Use the same symbol prefixing process as the rest of AWS-LC. This does not change how s2n-bignum gets handled.

(cherry picked from commit 754a124)
skmcgrail added a commit that referenced this pull request Sep 14, 2023
* Simplify the Kyber prefix build (#1131)

Use the same symbol prefixing process as the rest of AWS-LC. This does not change how s2n-bignum gets handled.

(cherry picked from commit 754a124)

* Simplify Prefix Build Support (#1178)

(cherry picked from commit ebe0892)

* Add prefix symbols for Windows FIPS Shared Build (#1191)

(cherry picked from commit 195441d)

---------

Co-authored-by: Andrew Hopkins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants