Key derivation function based on NIST SP 800-108.

This commit is contained in:
akwizgran
2011-11-15 17:19:11 +00:00
parent 6a15c03e81
commit 9220bb3426
9 changed files with 83 additions and 56 deletions

View File

@@ -44,7 +44,7 @@ public class FrameReadWriteTest extends TestCase {
frameCipher = crypto.getFrameCipher();
random = new Random();
// Since we're sending frames to ourselves, we only need outgoing keys
outSecret = new byte[123];
outSecret = new byte[32];
random.nextBytes(outSecret);
ivKey = crypto.deriveIvKey(outSecret, true);
frameKey = crypto.deriveFrameKey(outSecret, true);