Tunnels: Move AES reply keys from HopConfig to TunnelCreatorConfig

to save space; not stored for participating tunnels.
This commit is contained in:
zzz
2020-10-23 12:58:45 +00:00
parent c84360ba4b
commit 4a4d814a17
6 changed files with 64 additions and 61 deletions

View File

@ -172,10 +172,9 @@ public class BuildMessageTestStandalone extends TestCase {
hop.setExpiration(now+10*60*1000);
hop.setIVKey(ctx.keyGenerator().generateSessionKey());
hop.setLayerKey(ctx.keyGenerator().generateSessionKey());
hop.setReplyKey(ctx.keyGenerator().generateSessionKey());
byte iv[] = new byte[BuildRequestRecord.IV_SIZE];
Arrays.fill(iv, (byte)i); // consistent for repeatability
hop.setReplyIV(iv);
cfg.setAESReplyKeys(i, ctx.keyGenerator().generateSessionKey(), iv);
hop.setReceiveTunnelId(new TunnelId(i+1));
}
return cfg;