Skip to content

Commit 1163217

Browse files
author
gefeili
committed
Roll back the change in AsconCXof128, update java doc.
1 parent 49695cf commit 1163217

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

core/src/main/java/org/bouncycastle/crypto/digests/AsconCXof128.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Ascon-CXOF128 was introduced in NIST Special Publication (SP) 800-232
88
* <p>
99
* Additional details and the specification can be found in:
10-
* <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-232.pdf">NIST SP 800-232
10+
* <a href="https://csrc.nist.gov/pubs/sp/800/232/final">NIST SP 800-232
1111
* Ascon-Based Lightweight Cryptography Standards for Constrained Devices</a>.
1212
* For reference source code and implementation details, please see:
1313
* <a href="https://github.com/ascon/ascon-c">Reference, highly optimized, masked C and
@@ -81,18 +81,18 @@ public void reset()
8181

8282
private void initState(byte[] z, int zOff, int zLen)
8383
{
84-
// if (zLen == 0)
85-
// {
86-
// p.set(0x500cccc894e3c9e8L, 0x5bed06f28f71248dL, 0x3b03a0f930afd512L, 0x112ef093aa5c698bL, 0x00c8356340a347f0L);
87-
// }
88-
// else
89-
// {
90-
p.set(0x675527c2a0e8de03L, 0x43d12d7dc0377bbcL, 0xe9901dec426e81b5L, 0x2ab14907720780b6L, 0x8f3f1d02d432bc46L);
91-
p.x0 ^= ((long)zLen) << 3;
92-
p.p(12);
93-
update(z, zOff, zLen);
94-
padAndAbsorb();
95-
// }
84+
if (zLen == 0)
85+
{
86+
p.set(0x500cccc894e3c9e8L, 0x5bed06f28f71248dL, 0x3b03a0f930afd512L, 0x112ef093aa5c698bL, 0x00c8356340a347f0L);
87+
}
88+
else
89+
{
90+
p.set(0x675527c2a0e8de03L, 0x43d12d7dc0377bbcL, 0xe9901dec426e81b5L, 0x2ab14907720780b6L, 0x8f3f1d02d432bc46L);
91+
p.x0 ^= ((long)zLen) << 3;
92+
p.p(12);
93+
update(z, zOff, zLen);
94+
padAndAbsorb();
95+
}
9696
super.reset();
9797
}
9898
}

core/src/main/java/org/bouncycastle/crypto/digests/AsconHash256.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Ascon-Hash256 was introduced in NIST Special Publication (SP) 800-232
77
* <p>
88
* Additional details and the specification can be found in:
9-
* <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-232.pdf">NIST SP 800-232
9+
* <a href="https://csrc.nist.gov/pubs/sp/800/232/final">NIST SP 800-232
1010
* Ascon-Based Lightweight Cryptography Standards for Constrained Devices</a>.
1111
* For reference source code and implementation details, please see:
1212
* <a href="https://github.com/ascon/ascon-c">Reference, highly optimized, masked C and

core/src/main/java/org/bouncycastle/crypto/digests/AsconXof128.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Ascon-XOF128 was introduced in NIST Special Publication (SP) 800-232
77
* <p>
88
* Additional details and the specification can be found in:
9-
* <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-232.pdf">NIST SP 800-232
9+
* <a href="https://csrc.nist.gov/pubs/sp/800/232/final">NIST SP 800-232
1010
* Ascon-Based Lightweight Cryptography Standards for Constrained Devices</a>.
1111
* For reference source code and implementation details, please see:
1212
* <a href="https://github.com/ascon/ascon-c">Reference, highly optimized, masked C and

core/src/main/java/org/bouncycastle/crypto/engines/AsconAEAD128.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Ascon-AEAD128 was introduced in NIST Special Publication (SP) 800-232
88
* <p>
99
* Additional details and the specification can be found in:
10-
* <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-232.pdf">NIST SP 800-232
10+
* <a href="https://csrc.nist.gov/pubs/sp/800/232/final">NIST SP 800-232
1111
* Ascon-Based Lightweight Cryptography Standards for Constrained Devices</a>.
1212
* For reference source code and implementation details, please see:
1313
* <a href="https://github.com/ascon/ascon-c">Reference, highly optimized, masked C and

0 commit comments

Comments
 (0)