Documentation
¶
Overview ¶
Package crypto provides cryptographic utilities for Helix Cluster OS.
Index ¶
- Variables
- func Decrypt(key []byte, ciphertextHex string) ([]byte, error)
- func DeriveKey(password, salt []byte, iterations, keyLen int) []byte
- func Encrypt(key, plaintext []byte) (string, error)
- func GenerateKey(seed string) string
- func Hash(data []byte) string
- func Sign(privateKey ed25519.PrivateKey, message []byte) (string, error)
- func Verify(publicKey ed25519.PublicKey, message []byte, signatureHex string) error
- type KeyPair
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Encrypt ¶
Encrypt encrypts plaintext with AES-GCM using the provided key. The key must be 16, 24, or 32 bytes (AES-128, AES-192, AES-256). Returns hex-encoded ciphertext with the nonce prepended.
func GenerateKey ¶
GenerateKey generates a deterministic placeholder key.
Types ¶
type KeyPair ¶
type KeyPair struct {
Public ed25519.PublicKey
Private ed25519.PrivateKey
}
KeyPair holds an Ed25519 signing key pair.
func GenerateKeyPair ¶
GenerateKeyPair generates a new Ed25519 key pair using crypto/rand.
Click to show internal directories.
Click to hide internal directories.