Threefish is available without Tweaks

已查看 14 次
跳至第一个未读帖子

Jeffrey Walton

未读,
2017年5月15日 14:58:432017/5/15
收件人 Crypto++ Users
Hi Everyone,

Threefish was checked-in at https://github.com/weidai11/cryptopp/commit/8c34a5f7f5d1.

The block cipher provides key sizes of 256-bit, 512-bit and 1024-bit. It has very good performance, especially Threeish-512. 512 out-performs the 256-bit version, and it achieves almost 400 Mib/s on a modern Skylake.

We had to disable the Tweak at the moment. We are arriving at the wrong result for G2 after Key Injection, but its not readily apparent why (so it has not been fixed). It was disabled at https://github.com/weidai11/cryptopp/commit/f60f21268751.

As soon as we get to the bottom of the key injection issue for tweaks, it will be re-enabled.

Jeff

Jeffrey Walton

未读,
2017年5月15日 18:11:052017/5/15
收件人 Crypto++ Users

We had to disable the Tweak at the moment. We are arriving at the wrong result for G2 after Key Injection, but its not readily apparent why (so it has not been fixed). It was disabled at https://github.com/weidai11/cryptopp/commit/f60f21268751.

As soon as we get to the bottom of the key injection issue for tweaks, it will be re-enabled

Arg... A typo was holding things up...

The original code used the following in UncheckedSetKey, which is where ciphers are keyed:

    m_tweak[2] = m_tweak[0] + m_tweak[1];

The correct code is:

    m_tweak[2] = m_tweak[0] ^ m_tweak[1];

We also needed a helper function for PutDecodedDatumInto. The test vectors are little-endian, so they don't copy/paste into a text file.

I'm going to add some test vectors and check-in the change.

Jeff

Jeffrey Walton

未读,
2017年5月15日 22:57:192017/5/15
收件人 Crypto++ Users

Jeffrey Walton

未读,
2017年5月16日 00:41:092017/5/16
收件人 Crypto++ Users

We are tracking the addition of Threefish with https://github.com/weidai11/cryptopp/issues/422. I closed the ticket out because the core functionality and self tests were cut-in.

We will handle the design changes for the Tweak under a new ticket. I'm going to open it when we start on Skein. Skein will need to reach into Threefish for the plain text feed forwarding, so we can evaluate the necessary changes then.

Also, if someone wants to jump on Skein, then feel free. Hashes are pretty easy. Just follow the way Adler, CRC32, SHA3 or Keccack does things. It mostly boils down to implementing Restart, Update and TruncatedFinal.
 
The block cipher provides key sizes of 256-bit, 512-bit and 1024-bit. It has very good performance, especially Threeish-512. 512 out-performs the 256-bit version, and it achieves almost 400 Mib/s on a modern Skylake.

By the way, I uploaded benchmarks based on Master. They are available at https://cryptopp.com/benchmarks-skylake.html. Kalyna and Threefish are rocking performance.

I also regenerated the Doxygen documentation.

Jeff
回复全部
回复作者
转发
0 个新帖子