Documentation ¶
Overview ¶
Package slowseeder implements a drop-in replacement for a rand source intended for cryptographic key generation.
It has been designed to be simple to comprehend. Generation is deterministic from a seed, uses multiple layered hashing functions, and is parameterized to easily extend the time spent during each iteration, making brute force and pre-computation more difficult.
Example (GenerateRSA) ¶
r, _ := New([]byte("slowseeder"), 1000, 3, 1024*16, 1) k, _ := rsa.GenerateKey(r, 2048) e := pem.EncodeToMemory(&pem.Block{ Type: "PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(k), }) fmt.Println(string(e))
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.