Skip to content

Commit 72513f2

Browse files
committed
Optimise extra ascon rounds between outputs
1 parent 0f613fa commit 72513f2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ protected void squeeze(byte[] output, int outOff, int len)
151151
}
152152
/* squeeze final output block */
153153
setBytes(x0, output, outOff, len);
154-
p(ASCON_PB_ROUNDS);
155-
}
154+
}
156155

157156
protected int hash(byte[] output, int outOff, int outLen)
158157
{

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ protected void padAndAbsorb()
6969
m_squeezing = true;
7070
super.padAndAbsorb();
7171
}
72+
else
73+
{
74+
p(ASCON_PB_ROUNDS);
75+
}
7276
}
7377

7478
@Override

0 commit comments

Comments
 (0)