Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull Falcon updates from PQClean #1523

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/algorithms/kem/classic_mceliece.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- **Authors' website**: https://classic.mceliece.org
- **Specification version**: SUPERCOP-20221025.
- **Primary Source**<a name="primary-source"></a>:
- **Source**: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e
- **Source**: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299
- **Implementation license (SPDX-Identifier)**: Public domain
- **Ancestors of primary source**:
- SUPERCOP-20221025 "clean" and "avx2" implementations
Expand Down
2 changes: 1 addition & 1 deletion docs/algorithms/kem/classic_mceliece.yml
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,4 @@ parameter-sets:
auxiliary-submitters: []
primary-upstream:
spdx-license-identifier: Public domain
source: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e
source: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299
2 changes: 1 addition & 1 deletion docs/algorithms/kem/hqc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- **Authors' website**: https://pqc-hqc.org/
- **Specification version**: NIST Round 3 submission.
- **Primary Source**<a name="primary-source"></a>:
- **Source**: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e
- **Source**: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299
- **Implementation license (SPDX-Identifier)**: Public domain
- **Ancestors of primary source**:
- https://github.com/jschanck/package-pqclean/tree/29f79e72/hqc, which takes it from:
Expand Down
2 changes: 1 addition & 1 deletion docs/algorithms/kem/hqc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ parameter-sets:
upstream: primary-upstream
primary-upstream:
spdx-license-identifier: Public domain
source: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e
source: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299
2 changes: 1 addition & 1 deletion docs/algorithms/kem/kyber.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- **Implementation license (SPDX-Identifier)**: CC0-1.0 or Apache-2.0
- **Optimized Implementation sources**: https://github.com/pq-crystals/kyber/commit/518de2414a85052bb91349bcbcc347f391292d5b with copy_from_upstream patches
- **pqclean-aarch64**:<a name="pqclean-aarch64"></a>
- **Source**: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e with copy_from_upstream patches
- **Source**: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299 with copy_from_upstream patches
- **Implementation license (SPDX-Identifier)**: CC0-1.0 and (CC0-1.0 or Apache-2.0) and (CC0-1.0 or MIT) and MIT


Expand Down
5 changes: 3 additions & 2 deletions docs/algorithms/kem/kyber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ primary-upstream:
spdx-license-identifier: CC0-1.0 or Apache-2.0
optimized-upstreams:
pqclean-aarch64:
source: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e
source: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299
with copy_from_upstream patches
spdx-license-identifier: CC0-1.0 and (CC0-1.0 or Apache-2.0) and (CC0-1.0 or MIT) and MIT
spdx-license-identifier: CC0-1.0 and (CC0-1.0 or Apache-2.0) and (CC0-1.0 or MIT)
and MIT
SWilson4 marked this conversation as resolved.
Show resolved Hide resolved
parameter-sets:
- name: Kyber512
claimed-nist-level: 1
Expand Down
2 changes: 1 addition & 1 deletion docs/algorithms/sig/dilithium.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- **Implementation license (SPDX-Identifier)**: CC0-1.0 or Apache-2.0
- **Optimized Implementation sources**: https://github.com/pq-crystals/dilithium/commit/3e9b9f1412f6c7435dbeb4e10692ea58f181ee51 with copy_from_upstream patches
- **pqclean-aarch64**:<a name="pqclean-aarch64"></a>
- **Source**: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e with copy_from_upstream patches
- **Source**: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299 with copy_from_upstream patches
- **Implementation license (SPDX-Identifier)**: CC0-1.0 and (CC0-1.0 or Apache-2.0) and (CC0-1.0 or MIT) and MIT


Expand Down
5 changes: 3 additions & 2 deletions docs/algorithms/sig/dilithium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ primary-upstream:
spdx-license-identifier: CC0-1.0 or Apache-2.0
optimized-upstreams:
pqclean-aarch64:
source: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e
source: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299
with copy_from_upstream patches
spdx-license-identifier: CC0-1.0 and (CC0-1.0 or Apache-2.0) and (CC0-1.0 or MIT) and MIT
spdx-license-identifier: CC0-1.0 and (CC0-1.0 or Apache-2.0) and (CC0-1.0 or MIT)
and MIT
SWilson4 marked this conversation as resolved.
Show resolved Hide resolved
parameter-sets:
- name: Dilithium2
oqs_alg: OQS_SIG_alg_dilithium_2
Expand Down
2 changes: 1 addition & 1 deletion docs/algorithms/sig/falcon.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- **Authors' website**: https://falcon-sign.info
- **Specification version**: 20211101.
- **Primary Source**<a name="primary-source"></a>:
- **Source**: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e
- **Source**: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299
- **Implementation license (SPDX-Identifier)**: MIT


Expand Down
2 changes: 1 addition & 1 deletion docs/algorithms/sig/falcon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ website: https://falcon-sign.info
nist-round: 3
spec-version: 20211101
primary-upstream:
source: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e
source: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299
spdx-license-identifier: MIT
upstream-ancestors:
- https://www.falcon-sign.info
Expand Down
2 changes: 1 addition & 1 deletion docs/algorithms/sig/sphincs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- **Authors' website**: https://sphincs.org/
- **Specification version**: NIST Round 3 submission, v3.1 (June 10, 2022).
- **Primary Source**<a name="primary-source"></a>:
- **Source**: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e with copy_from_upstream patches
- **Source**: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299 with copy_from_upstream patches
- **Implementation license (SPDX-Identifier)**: CC0-1.0


Expand Down
2 changes: 1 addition & 1 deletion docs/algorithms/sig/sphincs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ nist-round: 3
spec-version: NIST Round 3 submission, v3.1 (June 10, 2022)
spdx-license-identifier: CC0-1.0
primary-upstream:
source: https://github.com/PQClean/PQClean/commit/66e50172055aaf1b9a16d8f35fe03b0807f2723e
source: https://github.com/PQClean/PQClean/commit/c3abebf4ab1ff516ffa71e6337f06d898952c299
with copy_from_upstream patches
spdx-license-identifier: CC0-1.0
upstream-ancestors:
Expand Down
2 changes: 1 addition & 1 deletion scripts/copy_from_upstream/copy_from_upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ upstreams:
name: pqclean
git_url: https://github.com/PQClean/PQClean.git
git_branch: master
git_commit: 66e50172055aaf1b9a16d8f35fe03b0807f2723e
git_commit: c3abebf4ab1ff516ffa71e6337f06d898952c299
kem_meta_path: 'crypto_kem/{pqclean_scheme}/META.yml'
sig_meta_path: 'crypto_sign/{pqclean_scheme}/META.yml'
kem_scheme_path: 'crypto_kem/{pqclean_scheme}'
Expand Down
6 changes: 3 additions & 3 deletions src/sig/falcon/pqclean_falcon-1024_avx2/sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,9 +1030,9 @@ PQCLEAN_FALCON1024_AVX2_gaussian0_sampler(prng *p) {
* On 32-bit systems, 'lo' really is two registers, requiring
* some extra code.
*/
#if defined(__x86_64__) || defined(_M_X64)
#if defined(__x86_64__) || defined(_M_X64)
xlo = _mm256_broadcastq_epi64(_mm_cvtsi64_si128(*(int64_t *)&lo));
#else
#else
{
uint32_t e0, e1;
int32_t f0, f1;
Expand All @@ -1043,7 +1043,7 @@ PQCLEAN_FALCON1024_AVX2_gaussian0_sampler(prng *p) {
f1 = *(int32_t *)&e1;
xlo = _mm256_set_epi32(f1, f0, f1, f0, f1, f0, f1, f0);
}
#endif
#endif
gtlo0 = _mm256_cmpgt_epi64(_mm256_loadu_si256(&rlo57.ymm[0]), xlo);
gtlo1 = _mm256_cmpgt_epi64(_mm256_loadu_si256(&rlo57.ymm[1]), xlo);
gtlo2 = _mm256_cmpgt_epi64(_mm256_loadu_si256(&rlo57.ymm[2]), xlo);
Expand Down
6 changes: 3 additions & 3 deletions src/sig/falcon/pqclean_falcon-512_avx2/sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,9 +1030,9 @@ PQCLEAN_FALCON512_AVX2_gaussian0_sampler(prng *p) {
* On 32-bit systems, 'lo' really is two registers, requiring
* some extra code.
*/
#if defined(__x86_64__) || defined(_M_X64)
#if defined(__x86_64__) || defined(_M_X64)
xlo = _mm256_broadcastq_epi64(_mm_cvtsi64_si128(*(int64_t *)&lo));
#else
#else
{
uint32_t e0, e1;
int32_t f0, f1;
Expand All @@ -1043,7 +1043,7 @@ PQCLEAN_FALCON512_AVX2_gaussian0_sampler(prng *p) {
f1 = *(int32_t *)&e1;
xlo = _mm256_set_epi32(f1, f0, f1, f0, f1, f0, f1, f0);
}
#endif
#endif
gtlo0 = _mm256_cmpgt_epi64(_mm256_loadu_si256(&rlo57.ymm[0]), xlo);
gtlo1 = _mm256_cmpgt_epi64(_mm256_loadu_si256(&rlo57.ymm[1]), xlo);
gtlo2 = _mm256_cmpgt_epi64(_mm256_loadu_si256(&rlo57.ymm[2]), xlo);
Expand Down