Operate v0.1.0-beta.15 Operate.VM.Extension.Crypto View Source

Extends the VM state with common crypto functions.

Link to this section Summary

Functions

Decrypts the given data with the given secret using AES-GCM.

Encrypts the given data with the given secret using AES-GCM.

Signs the given Bitcoin Message with the given ECDSA private key.

Verifies the given signature and Bitcoin Message with the given ECDSA public key.

Signs the given data with the given ECDSA private key.

Verifies the given signature and message with the given ECDSA public key.

Decrypts the given data with the given ECDSA private key using ECIES.

Encrypts the given data with the given ECDSA public key using ECIES.

Callback implementation for Operate.VM.Extension.extend/1.

Hashes the given data using the specified algorithm.

Decrypts the given data with the given RSA public or private key.

Encrypts the given data with the given RSA public or private key.

Signs the given data with the given RSA private key.

Verifies the given signature and message with the given RSA public key.

Link to this section Functions

Link to this function

aes_decrypt(data, key, opts \\ %{})

View Source

Decrypts the given data with the given secret using AES-GCM.

Link to this function

aes_encrypt(data, key, opts \\ %{})

View Source

Encrypts the given data with the given secret using AES-GCM.

Link to this function

bitcoin_message_sign(data, key, opts \\ %{})

View Source

Signs the given Bitcoin Message with the given ECDSA private key.

Link to this function

bitcoin_message_verify(sig, data, key, opts \\ %{})

View Source

Verifies the given signature and Bitcoin Message with the given ECDSA public key.

Link to this function

ecdsa_sign(data, key, opts \\ %{})

View Source

Signs the given data with the given ECDSA private key.

Link to this function

ecdsa_verify(sig, data, key, opts \\ %{})

View Source

Verifies the given signature and message with the given ECDSA public key.

Link to this function

ecies_decrypt(data, key, opts \\ %{})

View Source

Decrypts the given data with the given ECDSA private key using ECIES.

Link to this function

ecies_encrypt(data, key, opts \\ %{})

View Source

Encrypts the given data with the given ECDSA public key using ECIES.

Callback implementation for Operate.VM.Extension.extend/1.

Link to this function

hash(algo, data, opts \\ %{})

View Source

Hashes the given data using the specified algorithm.

Link to this function

rsa_decrypt(data, key, opts \\ %{})

View Source

Decrypts the given data with the given RSA public or private key.

Link to this function

rsa_encrypt(data, key, opts \\ %{})

View Source

Encrypts the given data with the given RSA public or private key.

Link to this function

rsa_sign(data, key, opts \\ %{})

View Source

Signs the given data with the given RSA private key.

Link to this function

rsa_verify(sig, data, key, opts \\ %{})

View Source

Verifies the given signature and message with the given RSA public key.