File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
core/src/main/java/org/bouncycastle/pqc/crypto/mlkem Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -277,11 +277,9 @@ private byte[] packCipherText(PolyVec b, Poly v)
277277
278278 private void unpackCipherText (PolyVec b , Poly v , byte [] cipherText )
279279 {
280- byte [] compressedPolyVecCipherText = Arrays .copyOfRange (cipherText , 0 , engine .getKyberPolyVecCompressedBytes ());
281- b .decompressPolyVec (compressedPolyVecCipherText );
280+ b .decompressPolyVec (cipherText );
282281
283- byte [] compressedPolyCipherText = Arrays .copyOfRange (cipherText , engine .getKyberPolyVecCompressedBytes (), cipherText .length );
284- v .decompressPoly (compressedPolyCipherText );
282+ v .decompressPoly (cipherText , engine .getKyberPolyVecCompressedBytes ());
285283 }
286284
287285 public byte [] packPublicKey (PolyVec publicKeyPolyVec , byte [] seed )
Original file line number Diff line number Diff line change @@ -180,9 +180,9 @@ else if (polyCompressedBytes == 160)
180180 return r ;
181181 }
182182
183- public void decompressPoly (byte [] compressedPolyCipherText )
183+ public void decompressPoly (byte [] compressedPolyCipherText , int polyCipherOff )
184184 {
185- int i , count = 0 ;
185+ int i , count = polyCipherOff ;
186186
187187 if (engine .getKyberPolyCompressedBytes () == 128 )
188188 {
You can’t perform that action at this time.
0 commit comments