GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CRYPTO_WIPE(3MONOCYPHER) 3MONOCYPHER CRYPTO_WIPE(3MONOCYPHER)

crypto_wipewipe data from memory

#include <monocypher.h>

void
crypto_wipe(void *secret, size_t secret_size);

() securely erases sensitive data in memory.

Sensitive data (such as cryptographic keys or secret plaintexts) should be erased from memory as early as possible to minimise the window in which it can be leaked. Standard functions like memset and bzero are not safe to use as the compiler may decide they have no effect and optimise them out.

The arguments are:

secret
The buffer to erase.
secret_size
The number of bytes to erase from the buffer. This is normally the size of the entire buffer.

Monocypher will wipe its context structs when finalizing an operation such as signing or decrypting. When using direct interfaces like crypto_aead_lock(3monocypher), these context structs are invisible to you. However, they are exposed in incremental interfaces like crypto_blake2b_init(3monocypher). The original key buffer does not get automatically wiped. When using incremental interfaces, you may want to wipe the original key buffers immediately after calling the respective init function.

Using () alone may not be enough for security. It is recommended to lock down relevant memory regions as well. Refer to intro(3monocypher) for instructions on how to lock down memory on common operating systems.

This function returns nothing.

intro(3monocypher)

The crypto_wipe() function first appeared in Monocypher 1.1.0.

Monocypher does not perform any input validation. Any deviation from the specified input and output length ranges results in . Make sure your inputs are correct.

December 12, 2019 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.