diff options
author | Sergio Giro <sgiro@google.com> | 2016-02-01 14:37:23 +0000 |
---|---|---|
committer | Sergio Giro <sgiro@google.com> | 2016-02-01 15:16:12 +0000 |
commit | 397d32894b89b506dc318e0f83446187c9b76ebe (patch) | |
tree | 8229ff72c8cbb06f49dce3a8382930919fa6fc2b /bcprov/src/main/java/org/bouncycastle/jce/spec/MQVPublicKeySpec.java | |
parent | 9b30eb05e5be69d51881a0d1b31e503e97acd784 (diff) | |
parent | 6d876f3f0ae553704a1dcf7e89003fcf14717037 (diff) | |
download | bouncycastle-397d32894b89b506dc318e0f83446187c9b76ebe.tar.gz |
Merge remote-tracking branch 'aosp/upstream-master' into merge-152-from-upstream
As to set a common ancestor for future merges from aosp/upstream-master
(when updating to new versions of bouncycastle).
We'll override all the changes of this commit with patch
https://android-review.googlesource.com/#/c/199872
Change-Id: I53a7f797b520a6e119878dbae53246cdcc585ddf
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/jce/spec/MQVPublicKeySpec.java')
-rw-r--r-- | bcprov/src/main/java/org/bouncycastle/jce/spec/MQVPublicKeySpec.java | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/jce/spec/MQVPublicKeySpec.java b/bcprov/src/main/java/org/bouncycastle/jce/spec/MQVPublicKeySpec.java new file mode 100644 index 00000000..8b50d05f --- /dev/null +++ b/bcprov/src/main/java/org/bouncycastle/jce/spec/MQVPublicKeySpec.java @@ -0,0 +1,68 @@ +package org.bouncycastle.jce.spec; + +import java.security.PublicKey; +import java.security.spec.KeySpec; + +import org.bouncycastle.jce.interfaces.MQVPublicKey; + +/** + * Static/ephemeral public key pair for use with ECMQV key agreement + */ +public class MQVPublicKeySpec + implements KeySpec, MQVPublicKey +{ + private PublicKey staticKey; + private PublicKey ephemeralKey; + + /** + * @param staticKey the static public key. + * @param ephemeralKey the ephemeral public key. + */ + public MQVPublicKeySpec( + PublicKey staticKey, + PublicKey ephemeralKey) + { + this.staticKey = staticKey; + this.ephemeralKey = ephemeralKey; + } + + /** + * return the static public key + */ + public PublicKey getStaticKey() + { + return staticKey; + } + + /** + * return the ephemeral public key + */ + public PublicKey getEphemeralKey() + { + return ephemeralKey; + } + + /** + * return "ECMQV" + */ + public String getAlgorithm() + { + return "ECMQV"; + } + + /** + * return null + */ + public String getFormat() + { + return null; + } + + /** + * returns null + */ + public byte[] getEncoded() + { + return null; + } +} |