July 13, 2015
On Monday, 13 July 2015 at 19:35:32 UTC, Steven Schveighoffer wrote:
> On 7/13/15 2:11 PM, Adam D. Ruppe wrote:
>> On Monday, 13 July 2015 at 18:07:25 UTC, Jonathan M Davis wrote:
>>> Now, with a name like that, will it be able _en_crypt as well? ;)
>>
>> encrypt - a cryptography library written in English
>
> Better would be something that takes any stream of bytes and transforms it into readable english :)

Sure, it'll just grab stuff from google and claim that it translated it from the bytes. ;)

- Jonathan M Davis
July 14, 2015
On Monday, 13 July 2015 at 15:49:39 UTC, puzzlehawk wrote:
> dcrypt is a cryptography library written entirely in D and a little bit D inline assembler. The library is inspired by BouncyCastle. Most important symmetric algorithms are implemented but work on asymmetric cryptography has not yet started.
> dcrypt is not yet ready for daily use. There's a lot of work to be done and I'll be glad to get some feedback or collaboration.

Nice work!

For the hashes, I think you should follow the interface of the Phobos std.digest package, with `start`, `put` and `finish` methods:

http://dlang.org/phobos/std_digest_digest.html

Also, in 2.068 there will be an optional enum `blockSize` (in bits) for the hash algorithms, for use with the newly added std.digest.hmac. Your library has a runtime method for that. Isn't the block size always known at compile time? If you could change it to an enum, your library would be compatible with Phobos.

Maybe a similar interface should be used for the block ciphers?
July 14, 2015
On 14-Jul-2015 10:07, "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm@gmx.net>" wrote:
> On Monday, 13 July 2015 at 15:49:39 UTC, puzzlehawk wrote:
[snip]
>
> Also, in 2.068 there will be an optional enum `blockSize` (in bits) for
> the hash algorithms, for use with the newly added std.digest.hmac. Your
> library has a runtime method for that. Isn't the block size always known
> at compile time? If you could change it to an enum, your library would
> be compatible with Phobos.
>
> Maybe a similar interface should be used for the block ciphers?

Would be awesome to have similar API. Even most C API for hashes vs cyphers looks almost the same.

-- 
Dmitry Olshansky
1 2
Next ›   Last »