发表文章

[Java] Chacha20Poly1305 中的潜在复制粘贴错误 Potential Copy Paste Bug in Chacha20Poly1305[bc-java]

deeso 2017-10-9 26

我正在为一些实验编写一个定制的 TLS 客户端, 我注意到https://github.com/bcgit/bc-java/blob/master/core/src/main/java/org/bouncycastle/crypto/tls/Chacha20Poly1305.java#L33中可能存在一个 bug

        KeyParameter client_write_key = new KeyParameter(key_block, 0, 32);
        KeyParameter server_write_key = new KeyParameter(key_block, 32, 32);

KeyParameter server_write_key是否 new KeyParameter(key_block, 32, 64)

原文:

I was writing a custom TLS client for some experiments, and I noticed what might be a bug in https://github.com/bcgit/bc-java/blob/master/core/src/main/java/org/bouncycastle/crypto/tls/Chacha20Poly1305.java#L33

        KeyParameter client_write_key = new KeyParameter(key_block, 0, 32);
        KeyParameter server_write_key = new KeyParameter(key_block, 32, 32);

Should the KeyParameter server_write_key be new KeyParameter(key_block, 32, 64)?

相关推荐
最新评论 (1)
deeso 2017-10-9
1

我误读了 API

原文:

I misread the API.

返回
发表文章
deeso
文章数
1
评论数
1
注册排名
60881