19992013 Ericsson AB. All Rights Reserved. The contents of this file are subject to the Erlang Public License, Version 1.1, (the "License"); you may not use this file except in compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Crypto Release Notes Peter Högfeldt 2003-06-06 B notes.xml

This document describes the changes made to the Crypto application.

Crypto 2.3
Improvements and New Features

Enable runtime upgrade of crypto including the OpenSSL library used by crypto.

Own Id: OTP-10596

Improve documentation and tests for hmac functions in crypto. Thanks to Daniel White

Own Id: OTP-10640

Added ripemd160 support to crypto. Thanks to Michael Loftis

Own Id: OTP-10667

Crypto 2.2
Fixed Bugs and Malfunctions

Remove unnecessary dependency to libssl from crypto NIF library. This dependency was introduced by accident in R14B04.

Own Id: OTP-10064

Improvements and New Features

Add crypto and public_key support for the hash functions SHA224, SHA256, SHA384 and SHA512 and also hmac and rsa_sign/verify support using these hash functions. Thanks to Andreas Schultz for making a prototype.

Own Id: OTP-9908

Optimize RSA private key handling in crypto and public_key.

Own Id: OTP-10065

Make crypto:aes_cfb_128_encrypt and crypto:aes_cfb_128_decrypt handle data and cipher with arbitrary length. (Thanks to Stefan Zegenhagen)

Own Id: OTP-10136

Crypto 2.1
Improvements and New Features

public_key, ssl and crypto now supports PKCS-8

Own Id: OTP-9312

Erlang/OTP can now be built using parallel make if you limit the number of jobs, for instance using 'make -j6' or 'make -j10'. 'make -j' does not work at the moment because of some missing dependencies.

Own Id: OTP-9451

Add DES and Triple DES cipher feedback (CFB) mode functions to crypto. (Thanks to Paul Guyot)

Own Id: OTP-9640

Add sha256, sha384 and sha512 support for crypto:rsa_verify.

Own Id: OTP-9778

Crypto 2.0.4
Fixed Bugs and Malfunctions

crypto:rand_uniform works correctly for negative integers. Fails with badarg exception for invalid ranges (when Hi =< Lo) instead of returning incorrect output.

Own Id: OTP-9526

Fix win32 OpenSSL static linking (Thanks to Dave Cottlehuber)

Own Id: OTP-9532

Crypto 2.0.3
Fixed Bugs and Malfunctions

Various small documentation fixes (Thanks to Bernard Duggan)

Own Id: OTP-9172

Improvements and New Features

New crypto support for streaming of AES CTR and HMAC. (Thanks to Travis Jensen)

Own Id: OTP-9275

Due to standard library DLL mismatches between versions of OpenSSL and Erlang/OTP, OpenSSL is now linked statically to the crypto driver on Windows. This fixes problems starting crypto when running Erlang as a service on all Windows versions.

Own Id: OTP-9280

Crypto 2.0.2.2
Improvements and New Features

Strengthened random number generation. (Thanks to Geoff Cant)

Own Id: OTP-9225

Crypto 2.0.2.1
Improvements and New Features

Misc. Updates.

Own Id: OTP-9132

Crypto 2.0.2
Improvements and New Features

AES CTR encryption support in crypto.

Own Id: OTP-8752 Aux Id: seq11642

Crypto 2.0.1
Fixed Bugs and Malfunctions

Crypto dialyzer type error in md5_mac and sha_mac.

Own Id: OTP-8718

RC4 stream cipher didn't work. This since the new NIF implementation of crypto:rc4_encrypt_with_state/2 introduced in crypto-2.0 didn't return an updated state. (Thanks to Paul Guyot)

Own Id: OTP-8781

A number of memory leaks in the crypto NIF library have been fixed.

Own Id: OTP-8810

Improvements and New Features

Added erlang:system_info(build_type) which makes it easier to chose drivers, NIF libraries, etc based on build type of the runtime system.

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.

Own Id: OTP-8760

Crypto 2.0
Improvements and New Features

crypto application changed to use NIFs instead of driver.

Own Id: OTP-8333

des_ecb_encrypt/2 and des_ecb_decrypt/2 has been added to the crypto module. The crypto:md4/1 function has been documented.

Own Id: OTP-8551

The undocumented, unsupport, and deprecated function lists:flat_length/1 has been removed.

Own Id: OTP-8584

New variants of crypto:dss_sign and crypto:dss_verify with an extra argument to control how the digest is calculated.

Own Id: OTP-8700

Crypto 1.6.4
Improvements and New Features

Cross compilation improvements and other build system improvements.

Most notable:

Lots of cross compilation improvements. The old cross compilation support was more or less non-existing as well as broken. Please, note that the cross compilation support should still be considered as experimental. Also note that old cross compilation configurations cannot be used without modifications. For more information on cross compiling Erlang/OTP see the $ERL_TOP/INSTALL-CROSS.md file. Support for staged install using DESTDIR. The old broken INSTALL_PREFIX has also been fixed. For more information see the $ERL_TOP/INSTALL.md file. Documentation of the release target of the top Makefile. For more information see the $ERL_TOP/INSTALL.md file. make install now by default creates relative symbolic links instead of absolute ones. For more information see the $ERL_TOP/INSTALL.md file. $ERL_TOP/configure --help=recursive now works and prints help for all applications with configure scripts. Doing make install, or make release directly after make all no longer triggers miscellaneous rebuilds. Existing bootstrap system is now used when doing make install, or make release without a preceding make all. The crypto and ssl applications use the same runtime library path when dynamically linking against libssl.so and libcrypto.so. The runtime library search path has also been extended. The configure scripts of erl_interface and odbc now search for thread libraries and thread library quirks the same way as erts do. The configure script of the odbc application now also looks for odbc libraries in lib64 and lib/64 directories when building on a 64-bit system. The config.h.in file in the erl_interface application is now automatically generated in instead of statically updated which reduces the risk of configure tests without any effect.

(Thanks to Henrik Riomar for suggestions and testing)

(Thanks to Winston Smith for the AVR32-Linux cross configuration and testing)

*** POTENTIAL INCOMPATIBILITY ***

Own Id: OTP-8323

The crypto module now supports Blowfish in ECB, CBC and OFB modes. (Thanks to Paul Oliver.)

Own Id: OTP-8331

The documentation is now possible to build in an open source environment after a number of bugs are fixed and some features are added in the documentation build process.

- The arity calculation is updated.

- The module prefix used in the function names for bif's are removed in the generated links so the links will look like "http://www.erlang.org/doc/man/erlang.html#append_element-2" instead of "http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2".

- Enhanced the menu positioning in the html documentation when a new page is loaded.

- A number of corrections in the generation of man pages (thanks to Sergei Golovan)

- The legal notice is taken from the xml book file so OTP's build process can be used for non OTP applications.

Own Id: OTP-8343

Crypto 1.6.3
Fixed Bugs and Malfunctions

Suppressed false valgrind errors caused by libcrypto using uninitialized data as entropy.

Own Id: OTP-8200

Improvements and New Features

The documentation is now built with open source tools (xsltproc and fop) that exists on most platforms. One visible change is that the frames are removed.

Own Id: OTP-8201

When the crypto application failed to load the OpenSSL/LibEAY shared object, error indication was sparse. Now a more specific error message is sent to the error logger.

Own Id: OTP-8281

Crypto 1.6.2
Fixed Bugs and Malfunctions

Fixed emulator crash caused by crypto using an old openssl version that did not cope with large file descriptors.

Own Id: OTP-8261 Aux Id: seq11434

Crypto 1.6.1
Fixed Bugs and Malfunctions

Makefile.in has been updated to use the LDFLAGS environment variable (if set). (Thanks to Davide Pesavento.)

Own Id: OTP-8157

Improvements and New Features

Support for Blowfish cfb64 added to crypto.

Own Id: OTP-8096

New function crypto:aes_cbc_ivec

Own Id: OTP-8141

Crypto 1.6
Fixed Bugs and Malfunctions

The dh_compute_key sometimes returned a SharedSecret of incorrect size.

Own Id: OTP-7674

Improvements and New Features

Optimization for drivers by creating small binaries direct on process heap.

Own Id: OTP-7762

Crypto 1.5.3
Improvements and New Features

Added new functions: dss_verify/3, rsa_verify/3, rsa_verify/4, dss_sign/2, rsa_sign/2, rsa_sign/3, rsa_public_encrypt, rsa_private_decrypt/3, rsa_private_encrypt/3, rsa_public_decrypt/3, dh_generate_key/1, dh_generate_key/2, dh_compute_key/3.

Own Id: OTP-7545

Crypto 1.5.2.1
Improvements and New Features

Minor performance optimization.

Own Id: OTP-7521

Crypto 1.5.2
Fixed Bugs and Malfunctions

./configure has been improved to find 64-bit OpenSSL libraries.

Own Id: OTP-7270

Improvements and New Features

crypto and zlib drivers improved to allow concurent smp access.

Own Id: OTP-7262

Crypto 1.5.1.1
Improvements and New Features

The linked in driver for the crypto application is now linked statically against the OpenSSL libraries, to avoid installation and runtime problems in connection to the OpenSSL library locations.

Own Id: OTP-6680

Minor Makefile changes.

Own Id: OTP-6689

Crypto 1.5
Improvements and New Features

It is now explicitly checked at start-up that the crypto driver is properly loaded (Thanks to Claes Wikstrom).

Own Id: OTP-6109

Crypto 1.4
Improvements and New Features

The previously undocumented and UNSUPPORTED ssh application has been updated and documented. This release of the ssh application is still considered to be a beta release and (if necessary) there could still be changes in its API before it reaches 1.0.

Also, more cryptographic algorithms have been added to the crypto application.

*** POTENTIAL INCOMPATIBILITY ***

Own Id: OTP-5631

Crypto 1.3
Improvements and New Features

Added support for RFC 3826 - The Advanced Encryption Standard (AES) Cipher Algorithm in the SNMP User-based Security Model.

Martin Björklund

Crypto 1.2.3
Fixed Bugs and Malfunctions

Linked in drivers in the crypto, and asn1 applications are now compiled with the -D_THREAD_SAFE and -D_REENTRANT switches on unix when the emulator has thread support enabled.

Linked in drivers on MacOSX are not compiled with the undocumented -lbundle1.o switch anymore. Thanks to Sean Hinde who sent us a patch.

Linked in driver in crypto, and port programs in ssl, now compiles on OSF1.

Minor makefile improvements in runtime_tools.

Own Id: OTP-5346

Crypto 1.2.2
Improvements and New Features

Corrected error handling. If the port to the driver that crypto uses is unexpectedly closed (which should not happen during normal operation of crypto), crypto will terminate immediately (rather than crashing the next time crypto is used). Also corrected build problems on Mac OS X.

Own Id: OTP-5279

Crypto 1.2.1
Fixed Bugs and Malfunctions

It was not possible in R9 to relink the crypto driver. The object file was missing as well as an example makefile. The crypto driver object file is now released with the application (installed in priv/obj). An example makefile has also been added to the priv/obj directory. The makefile serves as an example of how to relink the driver on Unix (crypto_drv.so) or Windows (crypto_drv.dll).

Own Id: OTP-4828 Aux Id: seq8193

Crypto 1.2
Improvements and New Features

Previous versions of Crypto where delivered with statically linked binaries based on SSLeay. That is not longer the case. The current version of Crypto requires dynamically linked OpenSSL libraries that the user has to install. The library needed is libcrypto.so (Unix) or libeay32.[lib|dll] (Win32). For further details see the crypto(6) application manual page.

This version of Crypto uses the new DES interface of OpenSSL 0.9.7, which is not backward compatible with earlier versions of OpenSSL.

The functions des_ede3_cbc_encrypt/5 and des_ede3_cbc_decrypt/5 have been renamed to des3_cbc_encrypt/5 and des3_cbc_decrypt/5, respectively. The old functions have been retained (they are deprecated and not listed in the crypto(3) manual page).
Reported Fixed Bugs and Malfunctions

The start of crypto failed on Windows, due to erroneous addition of a DES3 algorithm.

Own Id: OTP-4684

Aux Id: seq7864

Crypto 1.1.3
Reported Fixed Bugs and Malfunctions To obtain backward compatibility with the old SSLeay package, and with earlier versions of OpenSSL, the macro OPENSSL_DES_LIBDES_COMPATIBILITY has been added to crypto_drv.c. This is of importance only for the open source version of Crypto.
Crypto 1.1.2
Reported Fixed Bugs and Malfunctions

In the manual page crypto(3) the function names md5_finish and sha_finish have been changed to md5_final and sha_final to correctly document the implementation.

Own Id: OTP-3409

Crypto 1.1.1

Code replacement in runtime is supported. Upgrade can be done from from version 1.1 and downgrade to version 1.1.

Improvements and New Features

The driver part of the Crypto application has been updated to use the erl_driver header file. Version 1.1.1 requires emulator version 4.9.1 or later.

Crypto 1.1
Reported Fixed Bugs and Malfunctions

On Windows the crypto_drv was incorrectly linked to static run-time libraries instead of dynamic ones.

Own Id: OTP-3240

Crypto 1.0

New application.