
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
gitlab.com/omnifi/automaatio/cryptography.git
Advanced tools
A minimal set of secure cryptographic functions designed to reduce repetitive code in automation projects. This package provides digital signature operations, SSH key management, and certificate handling with proper security controls and error handling, focusing on common cryptographic use cases.
Important note: This is not intended as a comprehensive cryptography replacement library. It provides a curated set of convenience functions that will be extended over time based on actual project needs.
This package eliminates common patterns that appear across automation projects:
go get git.omnifi.foundation/automaatio/cryptography
package main
import (
"log"
"git.omnifi.foundation/automaatio/cryptography/signatures"
"git.omnifi.foundation/automaatio/cryptography/ssh"
)
func main() {
// Generate Ed25519 cryptographic key pair
publicKey, privateKey, err := signatures.GenerateEd25519Keys()
if err != nil {
log.Fatal(err)
}
// Convert to SSH format for use with SSH clients
sshPublicKey, sshPrivateKey, err := ssh.GenerateEd25519KeysForSSH(&privateKey)
if err != nil {
log.Fatal(err)
}
log.Printf("Generated Ed25519 key pair for SSH use")
}
package main
import (
"log"
"git.omnifi.foundation/automaatio/cryptography/signatures"
"git.omnifi.foundation/automaatio/cryptography/ssh"
)
func main() {
// Generate P-384 ECDSA key (recommended for high security)
ecdsaPrivateKey, err := signatures.GenerateECDSAKeys(384)
if err != nil {
log.Fatal(err)
}
// Convert to SSH format
publicKeyString, privateKeyString, err := ssh.GenerateECDSAKeysForSSH(ecdsaPrivateKey)
if err != nil {
log.Fatal(err)
}
log.Printf("Generated P-384 ECDSA key pair for SSH use")
}
GenerateEd25519Keys() (ed25519.PublicKey, ed25519.PrivateKey, error)Creates a new Ed25519 cryptographic key pair with built-in validation.
GenerateECDSAKeys(bitSize int) (*ecdsa.PrivateKey, error)Creates a new ECDSA key pair using the specified curve size (224, 256, 384, or 521 bits).
GenerateEd25519KeysForSSH(privateKey *ed25519.PrivateKey) ([]byte, []byte, error)Converts Ed25519 keys to OpenSSH format for use with SSH clients and servers.
GenerateECDSAKeysForSSH(privateKey *ecdsa.PrivateKey) (string, string, error)Converts ECDSA keys to SSH format with proper PEM encoding.
All functions return detailed error information through Go's standard error interface with contextual information:
Each error includes context about the operation that failed and the underlying cause.
The library includes comprehensive benchmarks for all operations:
# Run performance benchmarks
go test -bench=. ./...
Typical performance characteristics:
Run the complete test suite:
# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run tests with race detection
go test -race ./...
# Run benchmarks
go test -bench=. ./...
The package includes:
Building the basic binary can be achieved by the simple go build command:
go build -o .bin/ ./...
Cross-platform builds:
go generate ./... && \
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o .bin/darwin-amd64/ ./... && \
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o .bin/darwin-arm64/ ./... && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o .bin/linux-amd64/ ./... && \
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -o .bin/linux-arm/ ./... && \
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o .bin/linux-arm64/ ./... && \
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o .bin/windows-amd64/ ./... && \
CGO_ENABLED=0 GOOS=windows GOARCH=arm go build -o .bin/windows-arm/ ./...
Formatting:
go fmt ./...
Linting:
go vet ./...
This project is licensed under the GNU Lesser General Public License v3.0 (LGPL-3.0). See the LICENSE.txt file for complete license terms.
This package follows strict code quality standards:
This package prioritizes:
This library will expand gradually based on actual usage patterns in automation projects. Potential future additions may include:
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.