aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/spongycastle/prov/src/main/java/org/spongycastle/jce/spec/MQVPublicKeySpec.java
blob: f32c46fd82dd70c906fbed0a026ae6cd403fbd27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package org.spongycastle.jce.spec;

import java.security.PublicKey;
import java.security.spec.KeySpec;

import org.spongycastle.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;
    }
}