Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Curve25519Endpoint.cs
1using System.Numerics;
4
6{
11 {
16 : this(new Curve25519())
17 {
18 }
19
25 : this(new Curve25519(), SymmetricCipher)
26 {
27 }
28
34 : this(Curve, new AeadChaCha20Poly1305())
35 {
36 }
37
44 : base(Curve, SymmetricCipher)
45 {
46 }
47
53 : this(PublicKey, new AeadChaCha20Poly1305())
54 {
55 }
56
62 public Curve25519Endpoint(byte[] PublicKey, IE2eSymmetricCipher SymmetricCipher)
63 : base(PublicKey, new Curve25519(), SymmetricCipher)
64 {
65 }
66
70 public override string LocalName => "x25519";
71
75 public override int SecurityStrength => 128;
76
80 public override bool SupportsSignatures => false;
81
88 {
90 }
91
97 public override IE2eEndpoint CreatePrivate(byte[] Secret)
98 {
99 return new Curve25519Endpoint(new Curve25519(Secret), this.DefaultSymmetricCipher.CreteNew());
100 }
101
107 public override IE2eEndpoint CreatePublic(byte[] PublicKey)
108 {
110 }
111 }
112}
Curve25519Endpoint(byte[] PublicKey)
Curve25519 Montgomery Curve
override IE2eEndpoint CreatePublic(byte[] PublicKey)
Creates a new endpoint given a public key.
Curve25519Endpoint(Curve25519 Curve, IE2eSymmetricCipher SymmetricCipher)
Curve25519 Montgomery Curve
Curve25519Endpoint(IE2eSymmetricCipher SymmetricCipher)
Curve25519 Montgomery Curve
override IE2eEndpoint CreatePrivate(byte[] Secret)
Creates a new endpoint given a private key.
override int SecurityStrength
Security strength of End-to-End encryption scheme.
override bool SupportsSignatures
If signatures are supported.
override string LocalName
Local name of the E2E encryption scheme
override IE2eEndpoint Create(int SecurityStrength)
Creates a new key.
Curve25519Endpoint(Curve25519 Curve)
Curve25519 Montgomery Curve
Curve25519Endpoint(byte[] PublicKey, IE2eSymmetricCipher SymmetricCipher)
Curve25519 Montgomery Curve
virtual IE2eSymmetricCipher DefaultSymmetricCipher
Default symmetric cipher.
Definition: E2eEndpoint.cs:265
Abstract base class for Elliptic Curve endpoints.
Implements support for the AEAD-ChaCha20-Poly1305 cipher in hybrid End-to-End encryption schemes.
Curve25519, as defined in RFC 7748: https://tools.ietf.org/html/rfc7748
Definition: Curve25519.cs:13
Abstract base class for End-to-End encryption schemes.
Definition: IE2eEndpoint.cs:12
Interface for symmetric ciphers.
IE2eSymmetricCipher CreteNew()
Creates a new symmetric cipher object with the same settings as the current object.