Index: java/net/deterlab/abac/Context.java
===================================================================
--- java/net/deterlab/abac/Context.java	(revision 120b7d8b10a9806c893ffc2406c3e4afc9594dce)
+++ java/net/deterlab/abac/Context.java	(revision 12a2fa79c150c896e2b6c839b320cff7cba7c462)
@@ -1059,5 +1059,5 @@
     /**
      * Return a new credential supported by this Context.  It is not inserted
-     * in the Context.
+     * in the Context, but will have access to the context's keyid aliases.
      * @param head a Role, the head of the encoded ABAC statement
      * @param tail a Role, the tail of the decoded ABAC statement
@@ -1065,5 +1065,5 @@
      */
     public Credential newCredential(Role head, Role tail) {
-	return credentialFactory.generateCredential(head, tail);
+	return credentialFactory.generateCredential(head, tail, keyMap);
     }
 
Index: java/net/deterlab/abac/CredentialFactory.java
===================================================================
--- java/net/deterlab/abac/CredentialFactory.java	(revision 120b7d8b10a9806c893ffc2406c3e4afc9594dce)
+++ java/net/deterlab/abac/CredentialFactory.java	(revision 12a2fa79c150c896e2b6c839b320cff7cba7c462)
@@ -203,9 +203,11 @@
      * @param head a Role, the head of the encoded ABAC statement
      * @param tail a Role, the tail of the decoded ABAC statement
+     * @param aliases a KeyIDMap holding aliases for this creation
      * @return a Credential encoding that ABAC statement
      */
-    public Credential generateCredential(Role head, Role tail) {
+    public Credential generateCredential(Role head, Role tail, 
+	    KeyIDMap aliases) {
 	if (spec.isEmpty()) return null;
-	return spec.get(0).generateCredential(head, tail);
+	return spec.get(0).generateCredential(head, tail, aliases);
     }
 
Index: java/net/deterlab/abac/CredentialFactorySpecialization.java
===================================================================
--- java/net/deterlab/abac/CredentialFactorySpecialization.java	(revision 120b7d8b10a9806c893ffc2406c3e4afc9594dce)
+++ java/net/deterlab/abac/CredentialFactorySpecialization.java	(revision 12a2fa79c150c896e2b6c839b320cff7cba7c462)
@@ -3,6 +3,4 @@
 import java.io.*;
 import java.util.*;
-import java.lang.reflect.*;
-
 
 /**
@@ -31,6 +29,8 @@
      * @param head a Role, the head of the encoded ABAC statement
      * @param tail a Role, the tail of the decoded ABAC statement
+     * @param aliases a KeyIDMap containing aliases for keyids
      * @return a Credential encoding that ABAC statement
      */
-    public abstract Credential generateCredential(Role head, Role tail);
+    public abstract Credential generateCredential(Role head, Role tail, 
+	    KeyIDMap aliases);
 }
Index: java/net/deterlab/abac/GENICredentialv1_0.java
===================================================================
--- java/net/deterlab/abac/GENICredentialv1_0.java	(revision 120b7d8b10a9806c893ffc2406c3e4afc9594dce)
+++ java/net/deterlab/abac/GENICredentialv1_0.java	(revision 12a2fa79c150c896e2b6c839b320cff7cba7c462)
@@ -231,5 +231,6 @@
 		return new Credential[] { new GENICredentialv1_0(is, ids) }; 
 	    }
-	    public Credential generateCredential(Role head, Role tail) {
+	    public Credential generateCredential(Role head, Role tail,
+		    KeyIDMap aliases) {
 		return new GENICredentialv1_0(head, tail);
 	    }
Index: java/net/deterlab/abac/GENICredentialv1_1.java
===================================================================
--- java/net/deterlab/abac/GENICredentialv1_1.java	(revision 120b7d8b10a9806c893ffc2406c3e4afc9594dce)
+++ java/net/deterlab/abac/GENICredentialv1_1.java	(revision 12a2fa79c150c896e2b6c839b320cff7cba7c462)
@@ -51,4 +51,17 @@
 	super(head, tail);
 	keyMap = new KeyIDMap();
+    }
+
+    /**
+     * Create a credential from a head and tail role.  This credential has no
+     * underlying certificate, and cannot be exported or used in real proofs.
+     * make_cert can create a certificate for a credential initialized this
+     * way.  The keymap will be used to annotate the names.
+     * @param head the Role at the head of the credential
+     * @param tail the Role at the tail of the credential
+     */
+    public GENICredentialv1_1(Role head, Role tail, KeyIDMap km) {
+	super(head, tail);
+	keyMap = new KeyIDMap(km);
     }
     /**
@@ -114,35 +127,33 @@
     }
 
-    protected String makeTestMnemonic(String k) {
-	String rv = keyMap.keyToNickname(k);
-	int i = 0;
-
-	if ( rv != null ) return rv;
-	else return keyMap.addNickname(k, "name");
-    }
-
-
     protected void add_structured_role(Role r, Node top) {
 	if ( r.is_principal()) {
 	    Element p = doc.createElement("ABACprincipal");
 	    Element k = doc.createElement("keyid");
-	    Element m = doc.createElement("mnemonic");
+	    String ms = keyMap.keyToNickname(r.principal());
+	    Element m = (ms != null ) ? doc.createElement("mnemonic") : null;
 
 	    k.appendChild(doc.createTextNode(r.principal()));
-	    m.appendChild(doc.createTextNode(makeTestMnemonic(r.principal())));
 	    p.appendChild(k);
-	    p.appendChild(m);
+
+	    if (m != null ) {
+		m.appendChild(doc.createTextNode(ms));
+		p.appendChild(m);
+	    }
 	    top.appendChild(p);
 	} else if ( r.is_role() ) {
 	    Element p = doc.createElement("ABACprincipal");
 	    Element k = doc.createElement("keyid");
-	    Element m = doc.createElement("mnemonic");
+	    String ms = keyMap.keyToNickname(r.principal());
+	    Element m = (ms != null ) ? doc.createElement("mnemonic") : null;
 	    Element rr = doc.createElement("role");
 
 	    k.appendChild(doc.createTextNode(r.principal()));
-	    m.appendChild(doc.createTextNode(makeTestMnemonic(r.principal())));
 	    rr.appendChild(doc.createTextNode(r.role_name()));
 	    p.appendChild(k);
-	    p.appendChild(m);
+	    if (m != null ) {
+		m.appendChild(doc.createTextNode(ms));
+		p.appendChild(m);
+	    }
 	    top.appendChild(p);
 	    top.appendChild(rr);
@@ -150,14 +161,17 @@
 	    Element p = doc.createElement("ABACprincipal");
 	    Element k = doc.createElement("keyid");
-	    Element m = doc.createElement("mnemonic");
+	    String ms = keyMap.keyToNickname(r.principal());
+	    Element m = (ms != null ) ? doc.createElement("mnemonic") : null;
 	    Element rr = doc.createElement("role");
 	    Element lr = doc.createElement("linking_role");
 
 	    k.appendChild(doc.createTextNode(r.principal()));
-	    m.appendChild(doc.createTextNode(makeTestMnemonic(r.principal())));
 	    rr.appendChild(doc.createTextNode(r.role_name()));
 	    lr.appendChild(doc.createTextNode(r.linking_role()));
 	    p.appendChild(k);
-	    p.appendChild(m);
+	    if (m != null ) {
+		m.appendChild(doc.createTextNode(ms));
+		p.appendChild(m);
+	    }
 	    top.appendChild(p);
 	    top.appendChild(rr);
@@ -409,6 +423,7 @@
 		return new Credential[] { new GENICredentialv1_1(is, ids) }; 
 	    }
-	    public Credential generateCredential(Role head, Role tail) {
-		return new GENICredentialv1_1(head, tail);
+	    public Credential generateCredential(Role head, Role tail,
+		    KeyIDMap aliases) {
+		return new GENICredentialv1_1(head, tail, aliases);
 	    }
 	};
Index: java/net/deterlab/abac/GENIPrivCredential.java
===================================================================
--- java/net/deterlab/abac/GENIPrivCredential.java	(revision 120b7d8b10a9806c893ffc2406c3e4afc9594dce)
+++ java/net/deterlab/abac/GENIPrivCredential.java	(revision 12a2fa79c150c896e2b6c839b320cff7cba7c462)
@@ -285,6 +285,9 @@
 	 * @param head a Role to encode
 	 * @param tail a Role to encode
+	 * @param aliases a KeyIDMap with keyid aliases
+	 * @return null
 	 */
-	public Credential generateCredential(Role head, Role tail) {
+	public Credential generateCredential(Role head, Role tail, 
+		KeyIDMap aliases) {
 	    return null;
 	}
Index: java/net/deterlab/abac/X509Credential.java
===================================================================
--- java/net/deterlab/abac/X509Credential.java	(revision 120b7d8b10a9806c893ffc2406c3e4afc9594dce)
+++ java/net/deterlab/abac/X509Credential.java	(revision 12a2fa79c150c896e2b6c839b320cff7cba7c462)
@@ -348,5 +348,6 @@
 		return new Credential[] { new X509Credential(is, ids) }; 
 	    }
-	    public Credential generateCredential(Role head, Role tail) {
+	    public Credential generateCredential(Role head, Role tail,
+		    KeyIDMap aliases) {
 		return new X509Credential(head, tail);
 	    }
Index: java/net/deterlab/abac/regression/WriteCreds.java
===================================================================
--- java/net/deterlab/abac/regression/WriteCreds.java	(revision 120b7d8b10a9806c893ffc2406c3e4afc9594dce)
+++ java/net/deterlab/abac/regression/WriteCreds.java	(revision 12a2fa79c150c896e2b6c839b320cff7cba7c462)
@@ -60,4 +60,6 @@
 			new String[] { className}));
 
+	    for (Identity id: new Identity[] { acme, globotron, alice, bob } ) 
+		ctxt.load_id_chunk(id.getCertificate());
 
 	    Credential c = ctxt.newCredential(
