return (GnuDHPublicKey) new DHKeyPairX509Codec().decodePublicKey(k);
  public static GnuDHPublicKey valueOf(byte[] k)  {    // check magic...    // we should parse here enough bytes to know which codec to use, and    // direct the byte array to the appropriate codec.  since we only have one    // codec, we could have immediately tried it; nevertheless since testing    // one byte is cheaper than instatiating a codec that will fail we test    // the first byte before we carry on.    if (k[0] == Registry.MAGIC_RAW_DH_PUBLIC_KEY[0])      {        // it's likely to be in raw format. get a raw codec and hand it over        IKeyPairCodec codec = new DHKeyPairRawCodec();        return (GnuDHPublicKey) codec.decodePublicKey(k);      }    else      {        throw new IllegalArgumentException("magic");      }  }