Uses of Class
org.drasyl.crypto.CryptoException
Package
Description
Classes for crypto-related operations.
Libsodium wrappers for the crypto operations of drasyl
Contains classes necessary for encrypted peer/application communication.
-
Uses of CryptoException in org.drasyl.crypto
Modifier and TypeMethodDescriptionCrypto.convertIdentityKeyToKeyAgreementKey
(IdentityPublicKey publicKey) Converts the given ed25519 long timepublicKey
into a curve25519 key for (on-demand) key agreement.Crypto.convertLongTimeKeyPairToKeyAgreementKeyPair
(KeyPair<IdentityPublicKey, IdentitySecretKey> keyPair) Converts the given ed25519 long timekeyPair
into a curve25519 key pair for (on-demand) key agreement.byte[]
Crypto.decrypt
(byte[] cipher, byte[] authTag, Nonce nonce, SessionPair sessionPair) Decrypt the givencipher
, by verify theauthTag
as an authentication tag, uses the givennonce
and decrypting with the rx part of thesessionPair
.byte[]
Crypto.encrypt
(byte[] message, byte[] authTag, Nonce nonce, SessionPair sessionPair) Encrypts the givenmessage
, by addingauthTag
as an authentication tag, using the given (hopefully fresh)nonce
and encrypting with the tx part of thesessionPair
.Crypto.generateEphemeralKeyPair()
Generates a new curve25519 key pair for key exchange.Crypto.generateLongTimeKeyPair()
Generates a new ed25519 key pair for signing and on-demand encryption.<P extends PublicKey,
S extends SecretKey>
SessionPairCrypto.generateSessionKeyPair
(KeyPair<P, S> myKeyPair, PublicKey receiverPublicKey) Generates session key pair from themyKeyPair
andreceiverKeyPair
.byte[]
Crypto.sign
(byte[] message, IdentitySecretKey secretKey) Creates a signature for the givenmessage
with the givensecretKey
in detached mode (signature is not appended to message, rather it is standalone). -
Uses of CryptoException in org.drasyl.crypto.sodium
Modifier and TypeMethodDescriptionDrasylSodiumWrapper.cryptoKxClientSessionKeys
(byte[] clientPk, byte[] clientSk, byte[] serverPk) This function computes a pair of shared keys (rx and tx) using the client's public key clientPk, the client's secret key clientSk and the server's public key serverPk.DrasylSodiumWrapper.cryptoKxServerSessionKeys
(byte[] serverPk, byte[] serverSk, byte[] clientPk) This function computes a pair of shared keys (rx and tx) using the client's public key clientPk, the server's secret key serverSk and the server's public key serverPk. -
Uses of CryptoException in org.drasyl.node.channel
Modifier and TypeMethodDescriptionprotected void
DrasylNodeChannelInitializer.armStage
(DrasylChannel ch) This stage arms outbound and disarms inbound messages. -
Uses of CryptoException in org.drasyl.node.handler.crypto
Modifier and TypeMethodDescriptionprotected ArmHeader
PendingAgreement.buildAgreement
(Crypto crypto, long staleAt) protected Object
ModifierConstructorDescriptionprotected
AbstractArmHandler
(Crypto crypto, Duration expireAfter, int maxAgreements, Identity identity, IdentityPublicKey peerIdentity) LongTimeArmHandler
(Duration expireAfter, int maxAgreements, Identity identity, IdentityPublicKey peerIdentity) LongTimeArmHandler
(Crypto crypto, Duration expireAfter, int maxAgreements, Identity identity, IdentityPublicKey peerIdentity) PFSArmHandler
(Crypto crypto, Duration expireAfter, Duration retryInterval, int maxAgreements, Identity identity, IdentityPublicKey peerIdentity)