P2PWNC
Class P2PWNCCert

java.lang.Object
  extended byP2PWNC.P2PWNCProto
      extended byP2PWNC.P2PWNCCert

class P2PWNCCert
extends P2PWNCProto

This class represents a P2PWNC user certificate, which is issued by a team for one of its members. Such a certificate is composed of the user's public key, the public key of the team that the user belongs to and the team's signature (the certificate issuer signs the two public keys using its secret key).

Version:
0.0.1
Author:
Pantelis Frangoudis, Elias Efstathiou

Field Summary
static int P2PWNC_ALGO_ECC
          Elliptic Curve cryptosystem identifier.
static int P2PWNC_ALGO_RSA
          RSA cryptosystem identifier.
static int P2PWNC_MSG_CACK
          This message type corresponds to a P2PWNC "connection acknowledgement" message (CACK).
static int P2PWNC_MSG_CONN
          This message type corresponds to a P2PWNC "connect" message (CONN).
static int P2PWNC_MSG_RCPT
          This message type corresponds to a P2PWNC "receipt" message (RCPT).
static int P2PWNC_MSG_RREQ
          This message type corresponds to a P2PWNC "receipt request" message (RREQ).
static int P2PWNC_MSG_TEAR
          This message type corresponds to a P2PWNC "tear connection" message (TEAR).
static int P2PWNC_SERVER_PORT
          The standard port a service provider listens for client messages, as specified by the P2PWNC protocol).
protected  P2PWNCKey teamPublicKey
          Issuer team's public key.
protected  P2PWNCSignature teamSignature
          Signature of the issuer team (the team signs the two public keys using its secret key)
protected  P2PWNCKey userPublicKey
          User's public key.
 
Constructor Summary
(package private) P2PWNCCert()
          Constructs a certificate with null fields.
(package private) P2PWNCCert(P2PWNCKey teamPublicKey, P2PWNCKey userPublicKey, P2PWNCSignature teamSignature)
          Constructs a certificate with the specified parameters as the team's public key, user's public key and team's signature.
 
Method Summary
 P2PWNCKey getTeamPublicKey()
          Returns the team's public key.
 P2PWNCSignature getTeamSignature()
          Retirns the team's signature.
 P2PWNCKey getUserPublicKey()
          Returns the user's public key.
 void setTeamPublicKey(P2PWNCKey teamPublicKey)
          Sets the team's public key to the specified parameter.
 void setTeamSignature(P2PWNCSignature teamSignature)
          Sets the team signature to the specified parameter.
 void setUserPublicKey(P2PWNCKey userPublicKey)
          Sets the user's public key to the specified parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

teamPublicKey

protected P2PWNCKey teamPublicKey
Issuer team's public key.


userPublicKey

protected P2PWNCKey userPublicKey
User's public key.


teamSignature

protected P2PWNCSignature teamSignature
Signature of the issuer team (the team signs the two public keys using its secret key)


P2PWNC_SERVER_PORT

public static final int P2PWNC_SERVER_PORT
The standard port a service provider listens for client messages, as specified by the P2PWNC protocol).

See Also:
Constant Field Values

P2PWNC_ALGO_RSA

public static final int P2PWNC_ALGO_RSA
RSA cryptosystem identifier.

See Also:
Constant Field Values

P2PWNC_ALGO_ECC

public static final int P2PWNC_ALGO_ECC
Elliptic Curve cryptosystem identifier.

See Also:
Constant Field Values

P2PWNC_MSG_RCPT

public static final int P2PWNC_MSG_RCPT
This message type corresponds to a P2PWNC "receipt" message (RCPT).

See Also:
Constant Field Values

P2PWNC_MSG_CONN

public static final int P2PWNC_MSG_CONN
This message type corresponds to a P2PWNC "connect" message (CONN).

See Also:
Constant Field Values

P2PWNC_MSG_RREQ

public static final int P2PWNC_MSG_RREQ
This message type corresponds to a P2PWNC "receipt request" message (RREQ).

See Also:
Constant Field Values

P2PWNC_MSG_CACK

public static final int P2PWNC_MSG_CACK
This message type corresponds to a P2PWNC "connection acknowledgement" message (CACK).

See Also:
Constant Field Values

P2PWNC_MSG_TEAR

public static final int P2PWNC_MSG_TEAR
This message type corresponds to a P2PWNC "tear connection" message (TEAR).

See Also:
Constant Field Values
Constructor Detail

P2PWNCCert

P2PWNCCert()
Constructs a certificate with null fields.


P2PWNCCert

P2PWNCCert(P2PWNCKey teamPublicKey,
           P2PWNCKey userPublicKey,
           P2PWNCSignature teamSignature)
Constructs a certificate with the specified parameters as the team's public key, user's public key and team's signature.

Parameters:
teamPublicKey - P2PWNCKey The public key of the issuer team.
userPublicKey - P2PWNCKey The public key of the user.
teamSignature - P2PWNCSignature The signature generated by the team using its secret key.
Method Detail

getTeamPublicKey

public P2PWNCKey getTeamPublicKey()
Returns the team's public key.

Returns:
P2PWNCKey

getUserPublicKey

public P2PWNCKey getUserPublicKey()
Returns the user's public key.

Returns:
P2PWNCKey

getTeamSignature

public P2PWNCSignature getTeamSignature()
Retirns the team's signature.


setTeamPublicKey

public void setTeamPublicKey(P2PWNCKey teamPublicKey)
Sets the team's public key to the specified parameter.

Parameters:
teamPublicKey - P2PWNCKey The value teamPublicKey will be set to.

setUserPublicKey

public void setUserPublicKey(P2PWNCKey userPublicKey)
Sets the user's public key to the specified parameter.

Parameters:
userPublicKey - P2PWNCKey The value userPublicKey will be set to.

setTeamSignature

public void setTeamSignature(P2PWNCSignature teamSignature)
Sets the team signature to the specified parameter.

Parameters:
teamSignature - P2PWNCSignature The value teamSignature will be set to.