33import java .math .BigInteger ;
44import java .security .SecureRandom ;
55
6-
76import org .bouncycastle .crypto .SecretWithEncapsulation ;
87import org .bouncycastle .crypto .kems .SAKKEKEMExtractor ;
98import org .bouncycastle .crypto .kems .SAKKEKEMSGenerator ;
1514import org .bouncycastle .util .encoders .Hex ;
1615import org .bouncycastle .util .test .FixedSecureRandom ;
1716import org .bouncycastle .util .test .SimpleTest ;
18- import org .junit .Assert ;
1917
2018public class SAKKEKEMSTest
2119 extends SimpleTest
@@ -148,7 +146,7 @@ private void testTestVector()
148146 ECPoint P = curve .createPoint (Px , Py );
149147
150148 ECPoint computed_Z = P .multiply (z ).normalize ();
151- Assert . assertTrue (computed_Z .equals (curve .createPoint (Zx , Zy )));
149+ isTrue (computed_Z .equals (curve .createPoint (Zx , Zy )));
152150
153151 SecureRandom random = new FixedSecureRandom (new FixedSecureRandom .Source []{new FixedSecureRandom .Data (ssv )});
154152 SAKKEPublicKeyParameters b_publicKey = new SAKKEPublicKeyParameters (new BigInteger (b ), curve .createPoint (Zx , Zy ));
@@ -158,7 +156,7 @@ private void testTestVector()
158156
159157 SAKKEKEMExtractor extractor = new SAKKEKEMExtractor (new SAKKEPrivateKeyParameters (z , b_publicKey ));
160158 byte [] test = extractor .extractSecret (rlt .getEncapsulation ());
161- Assert . assertTrue (Arrays .areEqual (test , ssv ));
159+ isTrue (Arrays .areEqual (test , ssv ));
162160 }
163161
164162 private void testRandom ()
@@ -172,6 +170,6 @@ private void testRandom()
172170 SecretWithEncapsulation rlt = generator .generateEncapsulated (b_pub );
173171 SAKKEKEMExtractor extractor = new SAKKEKEMExtractor (b_priv );
174172 byte [] test = extractor .extractSecret (rlt .getEncapsulation ());
175- Assert . assertTrue (Arrays .areEqual (test , ssv ));
173+ isTrue (Arrays .areEqual (test , ssv ));
176174 }
177175}
0 commit comments