- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for EncapsulationKey (0.15 sec)
-
src/crypto/internal/mlkem768/mlkem768_test.go
t.Fatal(err) } c, Ke, err := Encapsulate(dk.EncapsulationKey()) if err != nil { t.Fatal(err) } Kd, err := Decapsulate(dk, c) if err != nil { t.Fatal(err) } if !bytes.Equal(Ke, Kd) { t.Fail() } dk1, err := GenerateKey() if err != nil { t.Fatal(err) } if bytes.Equal(dk.EncapsulationKey(), dk1.EncapsulationKey()) { t.Fail() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 15:27:18 UTC 2024 - 10.3K bytes - Viewed (0) -
src/crypto/internal/mlkem768/mlkem768.go
func Encapsulate(encapsulationKey []byte) (ciphertext, sharedKey []byte, err error) { // The actual logic is in a separate function to outline this allocation. var cc [CiphertextSize]byte return encapsulate(&cc, encapsulationKey) } func encapsulate(cc *[CiphertextSize]byte, encapsulationKey []byte) (ciphertext, sharedKey []byte, err error) { if len(encapsulationKey) != EncapsulationKeySize {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 28.4K bytes - Viewed (0) -
src/crypto/tls/key_schedule_test.go
t.Fatalf("got %x, want %x", ss, exp) } } func TestKyberEncapsulate(t *testing.T) { dk, err := mlkem768.GenerateKey() if err != nil { t.Fatal(err) } ct, ss, err := kyberEncapsulate(dk.EncapsulationKey()) if err != nil { t.Fatal(err) } dkSS, err := kyberDecapsulate(dk, ct) if err != nil { t.Fatal(err) } if !bytes.Equal(ss, dkSS) { t.Fatalf("got %x, want %x", ss, dkSS) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 14:56:25 UTC 2024 - 13.2K bytes - Viewed (0) -
src/crypto/tls/handshake_client.go
// both, as allowed by draft-ietf-tls-hybrid-design-09, Section 3.2. hello.keyShares = []keyShare{ {group: x25519Kyber768Draft00, data: append(keyShareKeys.ecdhe.PublicKey().Bytes(), keyShareKeys.kyber.EncapsulationKey()...)}, {group: X25519, data: keyShareKeys.ecdhe.PublicKey().Bytes()}, } } else { if _, ok := curveForCurveID(curveID); !ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 38.6K bytes - Viewed (0)