Upload files to "v1"

This commit is contained in:
2025-12-22 15:15:42 +00:00
parent d5de70103a
commit cd100b6904
44 changed files with 4420 additions and 0 deletions

23
v1/cryptmeow.go Normal file
View File

@@ -0,0 +1,23 @@
package cryptmeow
import (
"angel_server/consts"
"crypto/rand"
"golang.org/x/crypto/curve25519"
)
func Gen_keypair() (publicKey [32]byte, privateKey [32]byte) {
consts.Logger.Warn("Generating ephemeral keys for SSH authetification.")
_, err := rand.Read(privateKey[:])
if err != nil {
consts.Logger.Error("Failed to generate private key: " + err.Error())
}
curve25519.ScalarBaseMult(&publicKey, &privateKey)
return publicKey, privateKey
}
var ControllerPublicKey, ControllerPrivateKey [32]byte = Gen_keypair()