public class ECIESCoder extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
KEY_SIZE |
| Constructor and Description |
|---|
ECIESCoder() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decrypt(BigInteger privKey,
byte[] cipher) |
static byte[] |
decrypt(BigInteger privKey,
byte[] cipher,
byte[] macData) |
static byte[] |
decrypt(org.spongycastle.math.ec.ECPoint ephem,
BigInteger prv,
byte[] IV,
byte[] cipher,
byte[] macData) |
static byte[] |
decryptSimple(BigInteger privKey,
byte[] cipher)
Encryption equivalent to the Crypto++ default ECIES ECP settings:
DL_KeyAgreementAlgorithm: DL_KeyAgreementAlgorithm_DH struct ECPPoint,struct EnumToType enum CofactorMultiplicationOption,0
DL_KeyDerivationAlgorithm: DL_KeyDerivationAlgorithm_P1363 struct ECPPoint,0,class P1363_KDF2 class SHA1
DL_SymmetricEncryptionAlgorithm: DL_EncryptionAlgorithm_Xor class HMAC class SHA1 ,0
DL_PrivateKey: DL_Key ECPPoint
DL_PrivateKey_EC class ECP
Used for Whisper V3
|
static byte[] |
encrypt(org.spongycastle.math.ec.ECPoint toPub,
byte[] plaintext) |
static byte[] |
encrypt(org.spongycastle.math.ec.ECPoint toPub,
byte[] plaintext,
byte[] macData) |
static byte[] |
encryptSimple(org.spongycastle.math.ec.ECPoint pub,
byte[] plaintext)
Encryption equivalent to the Crypto++ default ECIES ECP settings:
DL_KeyAgreementAlgorithm: DL_KeyAgreementAlgorithm_DH struct ECPPoint,struct EnumToType enum CofactorMultiplicationOption,0
DL_KeyDerivationAlgorithm: DL_KeyDerivationAlgorithm_P1363 struct ECPPoint,0,class P1363_KDF2 class SHA1
DL_SymmetricEncryptionAlgorithm: DL_EncryptionAlgorithm_Xor class HMAC class SHA1,0
DL_PrivateKey: DL_Key ECPPoint
DL_PrivateKey_EC class ECP
Used for Whisper V3
|
static int |
getOverhead() |
public static final int KEY_SIZE
public static byte[] decrypt(BigInteger privKey, byte[] cipher) throws IOException, org.spongycastle.crypto.InvalidCipherTextException
IOExceptionorg.spongycastle.crypto.InvalidCipherTextExceptionpublic static byte[] decrypt(BigInteger privKey, byte[] cipher, byte[] macData) throws IOException, org.spongycastle.crypto.InvalidCipherTextException
IOExceptionorg.spongycastle.crypto.InvalidCipherTextExceptionpublic static byte[] decrypt(org.spongycastle.math.ec.ECPoint ephem,
BigInteger prv,
byte[] IV,
byte[] cipher,
byte[] macData)
throws org.spongycastle.crypto.InvalidCipherTextException
org.spongycastle.crypto.InvalidCipherTextExceptionpublic static byte[] decryptSimple(BigInteger privKey, byte[] cipher) throws IOException, org.spongycastle.crypto.InvalidCipherTextException
privKey - privKeycipher - cipherIOException - IOExceptionorg.spongycastle.crypto.InvalidCipherTextException - InvalidCipherTextExceptionpublic static byte[] encrypt(org.spongycastle.math.ec.ECPoint toPub,
byte[] plaintext)
throws org.spongycastle.crypto.InvalidCipherTextException,
IOException
org.spongycastle.crypto.InvalidCipherTextExceptionIOExceptionpublic static byte[] encrypt(org.spongycastle.math.ec.ECPoint toPub,
byte[] plaintext,
byte[] macData)
throws org.spongycastle.crypto.InvalidCipherTextException,
IOException
org.spongycastle.crypto.InvalidCipherTextExceptionIOExceptionpublic static byte[] encryptSimple(org.spongycastle.math.ec.ECPoint pub,
byte[] plaintext)
throws IOException,
org.spongycastle.crypto.InvalidCipherTextException
pub - pubplaintext - plaintextIOException - IOExceptionorg.spongycastle.crypto.InvalidCipherTextException - InvalidCipherTextExceptionpublic static int getOverhead()
Copyright © 2018. All rights reserved.