Component: Hydro Encryption (Comms: Networking): Difference between revisions
Appearance
No edit summary |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 66: | Line 66: | ||
===hash_keygen=== | ===hash_keygen=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''hash_keygen''' | ||
|- | |- | ||
| colspan="2" | Creates a secret key suitable for use with the hash_hash function. You must provide a 32 byte array for the key. | | colspan="2" | Creates a secret key suitable for use with the hash_hash function. You must provide a 32 byte array for the key. | ||
| Line 85: | Line 85: | ||
===hash_with_key=== | ===hash_with_key=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''hash_with_key''' | ||
|- | |- | ||
| colspan="2" | Creates a hash fingerprint of the data, using the given key. Returns 0 if successful. | | colspan="2" | Creates a hash fingerprint of the data, using the given key. Returns 0 if successful. | ||
| Line 119: | Line 119: | ||
===hash_without_key=== | ===hash_without_key=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''hash_without_key''' | ||
|- | |- | ||
| colspan="2" | Creates a hash fingerprint of the data, which will always have the same fingerprint, similar to the MD5 or SHA-1 Returns 0 if successful. | | colspan="2" | Creates a hash fingerprint of the data, which will always have the same fingerprint, similar to the MD5 or SHA-1 Returns 0 if successful. | ||
| Line 148: | Line 148: | ||
===init=== | ===init=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''init''' | ||
|- | |- | ||
| colspan="2" | Initialisation function. To be called at the very start of your program. | | colspan="2" | Initialisation function. To be called at the very start of your program. | ||
| Line 162: | Line 162: | ||
===secretbox_decrypt=== | ===secretbox_decrypt=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''secretbox_decrypt''' | ||
|- | |- | ||
| colspan="2" | Decrypts a message with a secret key. A single key is used both to encrypt/sign and verify/decrypt messages. For this reason, it is critical to keep the key confidential. Returns 0 on success. | | colspan="2" | Decrypts a message with a secret key. A single key is used both to encrypt/sign and verify/decrypt messages. For this reason, it is critical to keep the key confidential. Returns 0 on success. | ||
| Line 201: | Line 201: | ||
===secretbox_encrypt=== | ===secretbox_encrypt=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''secretbox_encrypt''' | ||
|- | |- | ||
| colspan="2" | Encrypts a message with a secret key. A single key is used both to encrypt/sign and verify/decrypt messages. For this reason, it is critical to keep the key confidential. Returns 0 on success. | | colspan="2" | Encrypts a message with a secret key. A single key is used both to encrypt/sign and verify/decrypt messages. For this reason, it is critical to keep the key confidential. Returns 0 on success. | ||
| Line 240: | Line 240: | ||
===secretbox_keygen=== | ===secretbox_keygen=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''secretbox_keygen''' | ||
|- | |- | ||
| colspan="2" | Creates a secret key suitable for use with the secretbox functions. You must provide a 32 byte array for the key. | | colspan="2" | Creates a secret key suitable for use with the secretbox functions. You must provide a 32 byte array for the key. | ||
| Line 259: | Line 259: | ||
===sign_create=== | ===sign_create=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''sign_create''' | ||
|- | |- | ||
| colspan="2" | Computes a signature for a message using the secret key. Returns 0 if successful. | | colspan="2" | Computes a signature for a message using the secret key. Returns 0 if successful. | ||
| Line 293: | Line 293: | ||
===sign_keygen=== | ===sign_keygen=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''sign_keygen''' | ||
|- | |- | ||
| colspan="2" | Creates Private and Public key pair to sign and verify messages. Returns 0 if successful. | | colspan="2" | Creates Private and Public key pair to sign and verify messages. Returns 0 if successful. | ||
| Line 317: | Line 317: | ||
===sign_verify=== | ===sign_verify=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''sign_verify''' | ||
|- | |- | ||
| colspan="2" | Verify the signature of a mesasge using the public key. Returns 0 if successful. | | colspan="2" | Verify the signature of a mesasge using the public key. Returns 0 if successful. | ||
| Line 352: | Line 352: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|} | |} | ||
Latest revision as of 14:23, 13 July 2026
| Author | |
| Version | 1.0 |
| Category | Comms: Networking |
Hydro Encryption component
A cipher suite to enable encryption and decryption of data messages, based on libhydrogen.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_libhydrogen.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_libhydrogen.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
hash_keygen
| hash_keygen | |
| Creates a secret key suitable for use with the hash_hash function. You must provide a 32 byte array for the key. | |
| key | |
| Return | |
hash_with_key
hash_without_key
init
| init | |
| Initialisation function. To be called at the very start of your program. | |
| Return | |
secretbox_decrypt
secretbox_encrypt
secretbox_keygen
| secretbox_keygen | |
| Creates a secret key suitable for use with the secretbox functions. You must provide a 32 byte array for the key. | |
| key | |
| Return | |
sign_create
sign_keygen
sign_verify
Property reference
| Properties |