<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/crypto/src, branch OTP_R14B03</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Add true streaming AES (CTR) encryption and streaming HMAC operations</title>
<updated>2011-05-18T13:44:47+00:00</updated>
<author>
<name>Travis Jensen</name>
<email>Travis.Jensen@gmail.com</email>
</author>
<published>2011-05-06T18:36:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=b74ff4f6df28405222752fb2b1089f11e96e5406'/>
<id>b74ff4f6df28405222752fb2b1089f11e96e5406</id>
<content type='text'>
The current crypto module implementations require all of the data
being encrypted or authenticated to be in memory at one time. When
trying to encrypt or authenticate a large file (on order of GBs),
this is problematic.

The implementation of AES CTR uses the same underlying implementation
as aes_ctr_[en|de]crypt, but hands the state back to the client
after every operation.

The HMAC implementation differs from the previous implementations of
sha_mac and md5_mac. The old implementations did not utilize the
OpenSSL HMAC implementation. In order to ensure that I didn't
implement something incorrectly, I chose to use the OpenSSL HMAC
implementation directly, since it handles streaming as well. This
has the added side benefit of allowing other hash functions to be
used as desired (for instances, I added support for ripemd160
hashing).

While I haven't done this, it seems like the existing md5_mac and
sha_mac functions could either be depricated or redefined in terms
of the new hmac_ functions.

Update AES CTR and HMAC streaming with code review input

Ensure that memcpy operations in hmac operations are being size
checked properly. Rename aes_ctr_XXX_with_state to
aes_ctr_stream_XXX. Remove redundant hmac_init_[sha|md5|ripemd160]
functions. Fix documentation for hmac_final_n.

Fix possible error using negative value as a marker on an unsigned int

Now, use a separate marker and add a unit test to test specifically for
a case where HashLen is larger than the underlying resultant hash.

Revert "Fix possible error using negative value as a marker on an unsigned int"

This reverts commit 59cb177aa96444c0fd3ace6d01f7b8a70dd69cc9.

Resolve buffer overflow posibility on an unsigned int.

Change handling the marker for HashLen to use the fact that a second
parameter that has to be the the HashLen was passed. Also, ensure
that HashLen parameter is positive.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current crypto module implementations require all of the data
being encrypted or authenticated to be in memory at one time. When
trying to encrypt or authenticate a large file (on order of GBs),
this is problematic.

The implementation of AES CTR uses the same underlying implementation
as aes_ctr_[en|de]crypt, but hands the state back to the client
after every operation.

The HMAC implementation differs from the previous implementations of
sha_mac and md5_mac. The old implementations did not utilize the
OpenSSL HMAC implementation. In order to ensure that I didn't
implement something incorrectly, I chose to use the OpenSSL HMAC
implementation directly, since it handles streaming as well. This
has the added side benefit of allowing other hash functions to be
used as desired (for instances, I added support for ripemd160
hashing).

While I haven't done this, it seems like the existing md5_mac and
sha_mac functions could either be depricated or redefined in terms
of the new hmac_ functions.

Update AES CTR and HMAC streaming with code review input

Ensure that memcpy operations in hmac operations are being size
checked properly. Rename aes_ctr_XXX_with_state to
aes_ctr_stream_XXX. Remove redundant hmac_init_[sha|md5|ripemd160]
functions. Fix documentation for hmac_final_n.

Fix possible error using negative value as a marker on an unsigned int

Now, use a separate marker and add a unit test to test specifically for
a case where HashLen is larger than the underlying resultant hash.

Revert "Fix possible error using negative value as a marker on an unsigned int"

This reverts commit 59cb177aa96444c0fd3ace6d01f7b8a70dd69cc9.

Resolve buffer overflow posibility on an unsigned int.

Change handling the marker for HashLen to use the fact that a second
parameter that has to be the the HashLen was passed. Also, ensure
that HashLen parameter is positive.
</pre>
</div>
</content>
</entry>
<entry>
<title>Renamed the function strong_rand_uniform to strong_rand_mpint.</title>
<updated>2011-04-19T11:35:29+00:00</updated>
<author>
<name>Niclas Eklund</name>
<email>nick@erlang.org</email>
</author>
<published>2011-04-19T11:35:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=afe36b58bb77012f94b19213ed9602c2eb9fd420'/>
<id>afe36b58bb77012f94b19213ed9602c2eb9fd420</id>
<content type='text'>
Added some checks in crypto.erl and crypto.c.
Changed ssh_bits to use strong_rand_mpint.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added some checks in crypto.erl and crypto.c.
Changed ssh_bits to use strong_rand_mpint.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed SSH appup, copyright headers SSH vsn and SSH release note.</title>
<updated>2011-04-18T12:58:18+00:00</updated>
<author>
<name>Niclas Eklund</name>
<email>nick@erlang.org</email>
</author>
<published>2011-04-18T12:58:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c31065c750e37d5368398e9e2a741a1d4ec0588c'/>
<id>c31065c750e37d5368398e9e2a741a1d4ec0588c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Adds NIFs for cryptographically strong random number generation.</title>
<updated>2011-04-15T13:49:42+00:00</updated>
<author>
<name>Niclas Eklund</name>
<email>nick@erlang.org</email>
</author>
<published>2011-04-15T13:49:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=f505644be64cd4844742b361a8ff411d70f4aa88'/>
<id>f505644be64cd4844742b361a8ff411d70f4aa88</id>
<content type='text'>
Also adds documentation and unit tests.

Thanks to Geoff Cant.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also adds documentation and unit tests.

Thanks to Geoff Cant.
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto CTR support</title>
<updated>2010-11-17T15:12:46+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2010-09-23T14:39:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=19762575090d0f3c83c610de2a65cccf0c135516'/>
<id>19762575090d0f3c83c610de2a65cccf0c135516</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Build opt, debug and valgrind libraries as separate libraries</title>
<updated>2010-09-02T20:30:54+00:00</updated>
<author>
<name>Rickard Green</name>
<email>rickard@erlang.org</email>
</author>
<published>2010-08-11T21:57:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=ab64b20d32d9f496607d7a2d545194ad8d308956'/>
<id>ab64b20d32d9f496607d7a2d545194ad8d308956</id>
<content type='text'>
The NIF library for crypto can now be built for valgrind
and/or debug as separate NIF libraries that will be
automatically loaded if the runtime system has been built
with a matching build type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The NIF library for crypto can now be built for valgrind
and/or debug as separate NIF libraries that will be
automatically loaded if the runtime system has been built
with a matching build type.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix type spec error in crypto</title>
<updated>2010-07-08T12:30:38+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2010-06-17T15:56:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8b6f2052d0a83da44462cd2642a52341d4ee193b'/>
<id>8b6f2052d0a83da44462cd2642a52341d4ee193b</id>
<content type='text'>
Changed return types from "binary" to "binary()"
for md5_mac, md5_mac_96, sha_mac and sha_mac_96.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changed return types from "binary" to "binary()"
for md5_mac, md5_mac_96, sha_mac and sha_mac_96.
</pre>
</div>
</content>
</entry>
<entry>
<title>OTP-8700 crypto:dss_sign and dss_verify with pre-hashed digest.</title>
<updated>2010-06-09T12:19:56+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2010-06-09T12:01:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8e7719b8a5ae1d9e2e464d6d1a7abe502e0f9cd3'/>
<id>8e7719b8a5ae1d9e2e464d6d1a7abe502e0f9cd3</id>
<content type='text'>
New variants of crypto:dss_sign and crypto:dss_verify with an extra
argument to control how the digest is calculated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New variants of crypto:dss_sign and crypto:dss_verify with an extra
argument to control how the digest is calculated.
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: Add type specs for all documented functions</title>
<updated>2010-05-31T13:00:42+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2010-05-24T10:27:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=4b928be53fa903f091230f19b1fd7374eb096edf'/>
<id>4b928be53fa903f091230f19b1fd7374eb096edf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: Use erlang:nif_error/1 to squelch false Dialyzer warnings</title>
<updated>2010-05-31T13:00:42+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2010-05-21T14:15:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c28c4aa4b8d6d00540d36b860e1dd128cd9447e4'/>
<id>c28c4aa4b8d6d00540d36b860e1dd128cd9447e4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
