Welcome to mirror list, hosted at ThFree Co, Russian Federation.

MQVPublicKeySpec.java « spec « jce « bouncycastle « org « java « main « src « prov - gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8b50d05f6b7d2dca64cacb281f5e99284ce8c761 (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.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;
    }
}