spki
Class Capability5Tuple

java.lang.Object
  |
  +--spki.Tuple
        |
        +--spki.Capability5Tuple

public class Capability5Tuple
extends Tuple

spki Capability5Tuple class.

Version:
$Id: Capability5Tuple.java,v 1.5 2002/07/06 13:41:31 tep Exp $
Author:
Tep Narula <tep@win.trlabs.ca>

Field Summary
private static String __ME
          This class's full name.
private  Tag capability
          The capability field.
private  Empowerment empowerment
          The empowerment field.
 
Fields inherited from class spki.Tuple
__ME, issuer, subject, validity
 
Constructor Summary
Capability5Tuple()
          Don't use me.
Capability5Tuple(CapabilityCert cert)
          Create a Capability5Tuple object from given capability-cert.
Capability5Tuple(Issuer issuer, SubjectCapability subject, Empowerment empowerment, Tag capability, Validity validity)
          Create a Capability5Tuple object from given fields.
Capability5Tuple(TransferCert cert)
          Create a Capability5Tuple object from given transfer-cert.
 
Method Summary
static Tag AIntersect(Tag a1, Tag a2)
          A skeleton implementation of the AIntersect algorithm.
 Tag getCapability()
          Get the capability field.
 Empowerment getEmpowerment()
          Get the empowerment field.
 Capability5Tuple reduce(Capability5Tuple that)
          An implementation of the Non-threshold Capability 5-tuples Reduction Rules.
 Capability5Tuple reduce(Name4Tuple that)
          An implementation of the Name Reduction Rules.
 String toString()
           
 Capability5Tuple tReduce(Capability5Tuple that)
          An implementation of the Open-threshold Capability 5-tuples Reduction Rules.
 
Methods inherited from class spki.Tuple
contains, EIntersect, EUnion, getIssuer, getSubject, getValidity, MAX, MIN, NUnion, rSubjObjsExpand, SUnion, tEliminate, VIntersect
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

__ME

private static final String __ME
This class's full name.

empowerment

private Empowerment empowerment
The empowerment field.

capability

private Tag capability
The capability field.
Constructor Detail

Capability5Tuple

public Capability5Tuple()
Don't use me.

Capability5Tuple

public Capability5Tuple(Issuer issuer,
                        SubjectCapability subject,
                        Empowerment empowerment,
                        Tag capability,
                        Validity validity)
                 throws SPKIException
Create a Capability5Tuple object from given fields.
Parameters:
issuer - The issuer field.
subject - The subject field.
empowerment - The empowerment field.
capability - The capability field.
validity - The validity field.
Throws:
SPKIException - if something went wrong.

Capability5Tuple

public Capability5Tuple(CapabilityCert cert)
                 throws SPKIException
Create a Capability5Tuple object from given capability-cert.
Parameters:
cert - The capability-cert.
Throws:
SPKIException - if something went wrong.

Capability5Tuple

public Capability5Tuple(TransferCert cert)
                 throws SPKIException
Create a Capability5Tuple object from given transfer-cert.
Parameters:
cert - The transfer-cert.
Throws:
SPKIException - if something went wrong.
Method Detail

toString

public String toString()
Overrides:
toString in class Tuple

getEmpowerment

public Empowerment getEmpowerment()
Get the empowerment field.
Returns:
an Empowerment object.

getCapability

public Tag getCapability()
Get the capability field.
Returns:
a Tag object.

reduce

public Capability5Tuple reduce(Name4Tuple that)
                        throws ReductionException
An implementation of the Name Reduction Rules.
<I1, [(k1 SID1)] S1, E1, A1, V1> + <I2, S2, N2, V2> yield
<I1, [(k1 SID1)] S2, E1, A1, VIntersect(V1, V2)>
where (k1 SID1) may or may not be present, and provided:
  • S1 is a local name,
  • I2 == Ks1,
  • N2 == S1, and
  • VIntersect(V1, V2) succeeds.
    Parameters:
    that - the right-handed name 4-tuple to reduce this tuple with.
    Returns:
    the reduced 5-tuple.
    Throws:
    ReductionException - if the reduction fails.
    See Also:
    Tuple.VIntersect(Validity,Validity)

  • reduce

    public Capability5Tuple reduce(Capability5Tuple that)
                            throws ReductionException
    An implementation of the Non-threshold Capability 5-tuples Reduction Rules.
    <I1, [(k1 SID1)] S1, E1, A1, V1> + <I2, S2, E2, A2, V2> yield
    <I1, [(k1 SID1)] S2, EIntersect(E1, E2), AIntersect(A1, A2), VIntersect(V1, V2)>
    where (k1 SID1) may or may not be present, and provided:
  • S2 is not a threshold subject,
  • both S1 and S2 are principals,
  • I2 == S1,
  • EIntersect(E1, E2) succeeds,
  • AIntersect(A1, A2) succeeds, and
  • VIntersect(V1, V2) succeeds.
    NOTE: this method can deals with the right-handed subject containing either a single principal or a list of principals reduced from lower-level threshold delegation(s). For Open-threshold Reduction, please use the tReduce() method.
    Parameters:
    that - the right-handed 5-tuple to reduce this tuple with.
    Returns:
    the reduced 5-tuple.
    Throws:
    ReductionException - if the reduction fails.
    See Also:
    tReduce(Capability5Tuple), Tuple.EIntersect(Empowerment,Empowerment), AIntersect(Tag,Tag), Tuple.VIntersect(Validity,Validity)

  • tReduce

    public Capability5Tuple tReduce(Capability5Tuple that)
                             throws ReductionException
    An implementation of the Open-threshold Capability 5-tuples Reduction Rules.
    <I1, (k1 SID1) S1, E1, A1, V1> + <I2, (k2 SID2) S2, E2, A2, V2> yield
    <I1, SUnion((k1 SID1) S1, (k2 SID2) S2), EUnion(E1, E2), AIntersect(A1, A2), VIntersect(V1, V2)>
    provided:
  • I2 == S1,
  • SUnion(S1, S2) succeeds,
  • EUnion(E1, E2) succeeds,
  • AIntersect(A1, A2) succeeds, and
  • VIntersect(V1, V2) succeeds.
    Parameters:
    that - the right-handed 5-tuple to reduce this tuple with.
    Returns:
    the reduced 5-tuple.
    Throws:
    ReductionException - if the reduction fails.
    See Also:
    Tuple.SUnion(Subject,Subject), Tuple.EUnion(Empowerment,Empowerment), AIntersect(Tag,Tag), Tuple.VIntersect(Validity,Validity)

  • AIntersect

    public static Tag AIntersect(Tag a1,
                                 Tag a2)
                          throws IntersectionException
    A skeleton implementation of the AIntersect algorithm.
    AIntersect(A1, A2) yields one of the followings:
  • (*), if A1 == A2 == (*), or
  • A1, if A2 == (*), or
  • A2, if A1 == (*), or
  • (), i.e. an empty tag, if either A1 == () or A2 == (), or
  • Some A3, depending on application-specific capability-intersection semantics, or
  • (), if the intersection fails.
    NOTE: This implementation only checks for and deals with wildcard, empty, and equivalent tags, returning null otherwise. Override this method with your application-specific capability-intersection algorithm.
    Parameters:
    a1 - a Tag object to intersect.
    a2 - a Tag object to intersect.
    Returns:
    the resulting Tag object, or null.
    Throws:
    IntersectionException - if either argument is null.