Module ucrypto

July 22, 2013 · View on GitHub

uCrypto. Copyright (c) 2012, 2013 Alexander Færøy

Authors: Alexander Færøy (ahf@0x90.dk).

Description

This module contains the public API for the uCrypto library.

Data Types

ec_curve()


ec_curve() = ucrypto_types:ec_curve()

ec_hash_function()


ec_hash_function() = ucrypto_types:ec_hash_function()

ec_key()


ec_key() = ucrypto_types:ec_key()

ec_private_key()


ec_private_key() = ucrypto_types:ec_private_key()

ec_public_key()


ec_public_key() = ucrypto_types:ec_public_key()

ec_signature()


ec_signature() = ucrypto_types:ec_signature()

Function Index

bin2hex/1
ec_curve_size/1
ec_delete_key/1
ec_new_key/1
ec_new_key/3
ec_new_private_key/2
ec_new_public_key/2
ec_private_key/1
ec_public_key/1
ec_set_private_key/2
ec_set_public_key/2
ec_sign/2
ec_sign/3
ec_sign_hash/3
ec_sign_hash/4
ec_verify/3
ec_verify/4
ec_verify_hash/4
ec_verify_hash/5
hex2bin/1
ripemd160/1
ripemd160_final/1
ripemd160_init/0
ripemd160_update/2

Function Details

bin2hex/1


bin2hex(Bin::binary()) -> string()



ec_curve_size/1


ec_curve_size(X1::ec_curve()) -> integer()



ec_delete_key/1


ec_delete_key(X1::ec_key()) -> ok



ec_new_key/1


ec_new_key(Curve::ec_curve()) -> ec_key() | {error, any()}



ec_new_key/3


ec_new_key(Curve::ec_curve(), PrivateKey::ec_private_key(), PublicKey::ec_public_key()) -> ec_key() | {error, any()}



ec_new_private_key/2


ec_new_private_key(Curve::ec_curve(), PrivateKey::ec_private_key()) -> ec_key() | {error, any()}



ec_new_public_key/2


ec_new_public_key(Curve::ec_curve(), PublicKey::ec_public_key()) -> ec_key() | {error, any()}



ec_private_key/1


ec_private_key(X1::ec_key()) -> ec_private_key() | {error, any()}



ec_public_key/1


ec_public_key(X1::ec_key()) -> ec_public_key() | {error, any()}



ec_set_private_key/2


ec_set_private_key(X1::ec_key(), PrivateKey::ec_private_key()) -> ec_key() | {error, any()}



ec_set_public_key/2


ec_set_public_key(X1::ec_key(), PublicKey::ec_public_key()) -> ec_key() | {error, any()}



ec_sign/2


ec_sign(Data::iodata(), X2::ec_key()) -> ec_signature() | {error, any()}



ec_sign/3


ec_sign(Data::iodata(), Curve::ec_curve(), PrivateKey::ec_private_key()) -> ec_signature() | {error, any()}



ec_sign_hash/3


ec_sign_hash(Data::iodata(), Hash::ec_hash_function(), Key::ec_key()) -> ec_signature() | {error, any()}



ec_sign_hash/4


ec_sign_hash(Data::iodata(), Hash::ec_hash_function(), Curve::ec_curve(), PrivateKey::ec_private_key()) -> ec_signature() | {error, any()}



ec_verify/3


ec_verify(Data::iodata(), Signature::ec_signature(), X3::ec_key()) -> boolean() | {error, any()}



ec_verify/4


ec_verify(Data::iodata(), Signature::ec_signature(), Curve::ec_curve(), PublicKey::ec_public_key()) -> boolean() | {error, any()}



ec_verify_hash/4


ec_verify_hash(Data::iodata(), Hash::ec_hash_function(), Signature::ec_signature(), Key::ec_key()) -> boolean() | {error, any()}



ec_verify_hash/5


ec_verify_hash(Data::iodata(), Hash::ec_hash_function(), Signature::ec_signature(), Curve::ec_curve(), PublicKey::ec_public_key()) -> boolean() | {error, any()}



hex2bin/1


hex2bin(Rest::string()) -> binary()



ripemd160/1


ripemd160(Data::iodata()) -> binary()



ripemd160_final/1


ripemd160_final(Context::binary()) -> binary()



ripemd160_init/0


ripemd160_init() -> binary()



ripemd160_update/2


ripemd160_update(Context::binary(), Data::iodata()) -> binary()