install go2rtc on bob

This commit is contained in:
2026-04-04 19:36:14 +02:00
parent f0b56e63d1
commit ccf88187b8
537 changed files with 69213 additions and 0 deletions
@@ -0,0 +1,18 @@
package curve25519
import (
"crypto/rand"
"golang.org/x/crypto/curve25519"
)
func GenerateKeyPair() ([]byte, []byte) {
var publicKey, privateKey [32]byte
_, _ = rand.Read(privateKey[:])
curve25519.ScalarBaseMult(&publicKey, &privateKey)
return publicKey[:], privateKey[:]
}
func SharedSecret(privateKey, otherPublicKey []byte) ([]byte, error) {
return curve25519.X25519(privateKey, otherPublicKey)
}