Skip to content

Identity Profiles

Identity Profiles allow users to hide their Genesis Identifier during interactions. Instead, users will be identified by their Identity Profile.

An Identity Profile is generated by hashing the id with a profileNonce (a random number generated by the identity owner).

profileHash = hash(genesisId, profileNonce)

profileId = idType + profileHashCut + checksum
where: * idType - identifier of DID method and blockchain network & subnetwork, 2 bytes * profileHashCut - first 27 bytes of profileHash, 27 bytes * checksum - control checksum, 2 bytes * profileNonce - random number generated by the identity owner, 31 bytes (actually max ~253 bits to fit into the zk prime field)

package main

import (
    "fmt"
    "math/big"

    core "github.com/iden3/go-iden3-core"
)

// Generate Identity Profile from Genesis Identifier
func main() {

    id, _ := core.IDFromString("11BBCPZ6Zq9HX1JhHrHT3QKUFD9kFDEyJFoAVMptVs")

    profile, _ := core.ProfileID(id, big.NewInt(50))

    fmt.Println(profile.String())

}