
// Copyright the Hyperledger Fabric contributors. All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0

syntax = "proto3";

option go_package = "github.com/IBM/idemix/idemixmsp";

package idemixmsp;

// This struct represents an Idemix Identity
// to be used to serialize it and deserialize it.
// The IdemixMSP will first serialize an idemix identity to bytes using
// this proto, and then uses these bytes as id_bytes in SerializedIdentity
message SerializedIdemixIdentity {
    // nym_x is the X-component of the pseudonym elliptic curve point.
    // It is a []byte representation of an amcl.BIG
    // The pseudonym can be seen as a public key of the identity, it is used to verify signatures.
    bytes nym_x = 1;
    
    // nym_y is the Y-component of the pseudonym elliptic curve point.
    // It is a []byte representation of an amcl.BIG
    // The pseudonym can be seen as a public key of the identity, it is used to verify signatures.
    bytes nym_y = 2;
    
    // ou contains the organizational unit of the idemix identity
    bytes ou = 3;
    
    // role contains the role of this identity (e.g., ADMIN or MEMBER)
    bytes role = 4;
    
    // proof contains the cryptographic evidence that this identity is valid
    bytes proof = 5;
}