U++ framework
Do not panic. Ask here before giving up.

Home » Community » U++ community news and announcements » Secure random and nonce generator with SecureBuffer support
Secure random and nonce generator with SecureBuffer support [message #61983] Sun, 26 April 2026 12:27
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

Secure random and nonce generator with SecureBuffer support is added to Core/SSL package.
This addition introduces thread-safe nonce generation functions to the Core/SSL package, providing guaranteed uniqueness and fork-safety for cryptographic operations.

Public API:
/ Core functions
SecureBuffer<byte> SecureRandom(int n);  // Pure CSPRNG output
SecureBuffer<byte> SecureNonce(int n);   // Structured nonce (min 12 bytes)

// Protocol-specific helpers
SecureBuffer<byte> GetAESGCMNonce();           // 12 bytes, AES-GCM/ChaCha20-Poly1305
SecureBuffer<byte> GetChaChaPoly1305Nonce();   // 12 bytes, alias for AES-GCM
SecureBuffer<byte> GetTLSNonce();              // 12 bytes, TLS 1.2/1.3
SecureBuffer<byte> GetAESCCMNonce();           // 13 bytes, AES-CCM
SecureBuffer<byte> GetJWTNonce();              // 16 bytes, JWT tokens
SecureBuffer<byte> GetOAuthNonce();            // 16 bytes, OAuth flows
SecureBuffer<byte> GetOCSPNonce();             // 20 bytes, OCSP requests
SecureBuffer<byte> GetECDSANonce();            // 32 bytes, ECDSA signatures
SecureBuffer<byte> GetDTLSCookie();            // 32 bytes, DTLS cookies
Best regards,
Oblivion


Previous Topic: 2026.1rc1
Next Topic: U++ Discord Server
Goto Forum:
  


Current Time: Mon Apr 27 08:29:12 GMT+2 2026

Total time taken to generate the page: 0.00338 seconds