Crypto(Application)
π Welcome to the Crypto Application page, bestie π
Manual name: Crypto(Application). Author: Ericsson AB. This is the Crypto Application manual, and it's giving low-level crypto API realness, so let's get into it. π
πΈ NAME πΈ
Crypto Application β that's the name, periodt. π
β¨ DESCRIPTION β¨
π Description
The purpose of the Crypto application is to provide an Erlang API to cryptographic functions, see crypto. Heads up: the API is on a fairly low level, no cap, and there are some corresponding API functions available in public_key, on a higher abstraction level, that uses the crypto application in its implementation. π¦
π¦ DEPENDENCIES π¦
Okay so the current crypto implementation uses nifs to interface OpenSSL's crypto library, and it may work with limited functionality with versions as old as OpenSSL 0.9.8c. FIPS mode support requires at least version 1.0.1 and a FIPS capable OpenSSL installation. We recommend using a version that is officially supported by the OpenSSL project. API compatible backends like LibreSSL should also work. π
The crypto app is tested daily with at least one version of each of the OpenSSL 1.0.1, 1.0.2, 1.1.0, 1.1.1 and 3.0. FIPS mode is also tested for 1.0.1, 1.0.2 and 3.0. β¨
Using OpenSSL 3.0 with Engines is supported since OTP 26.2, slay. π₯
Source releases of OpenSSL can be downloaded from the OpenSSL project home page, or mirror sites listed there. π
π CONFIGURATION π
The following configuration parameters are defined for the crypto application. See app(3) for more information about configuration parameters. π
fips_mode = boolean()β Specifies whether to run crypto in FIPS mode. This setting will take effect when thenifmodule is loaded. If FIPS mode is requested but not available at run time thenifmodule and thus thecryptomodule will fail to load. This mechanism prevents the accidental use of non-validated algorithms. π₯rand_cache_size = integer()β Sets the cache size in bytes to use bycrypto:rand_seed_alg(crypto_cache)andcrypto:rand_seed_alg_s(crypto_cache). This parameter is read when a seed function is called, and then kept in generators state object. It has a rather small default value that causes reads of strong random bytes about once per hundred calls for a random value. The set value is rounded up to an integral number of words of the size these seed functions use. π
CHANGE: From Erlang/OTP 29, in interactive mode, application crypto will be automatically loaded if needed when module crypto is loaded. In embedded mode, module crypto will fail to load if application crypto has not been loaded by the boot script. This is all done to make sure crypto is not initialized with incorrect configuration parameters. In Erlang/OTP 28 and earlier, no automatic loading of the application is done. If module crypto is then loaded (by a first call for example) before the application has been loaded, it will initialize with possibly incorrect configuration parameters. In particular, fips_mode will then default to false even if configured to be true. π
π₯ SEE ALSO π₯
Source/version: crypto 5.10; date: 6; manual: Crypto(Application). That's the whole page, bestie β slay and read safe. π«Άπ
π¦ where this page comes from
- arch rolling: erlang-core 29.1.1-1 Β· Apache-2.0
- nixos 26.05: erlang 29.1.2
- nixpkgs unstable: erlang 29.1.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms