Skip to content

Baby Jubjub Key Pair

In Iden3 Protocol the public and private key pair is used to manage an identity and to authenticate in the name of an identity. In particular, Baby Jubjub is the elliptic curve used in Iden3. This curve is designed to work efficiently with zkSNARKs.

1.Initiate a Go Module

go mod init example/iden3-tutorial

2.Update the required dependencies.

go get

3.Generate a baby jubjub public key.

package main

import (

// BabyJubJub key
func main() {

    // generate babyJubjub private key randomly
    babyJubjubPrivKey := babyjub.NewRandPrivKey()

    // generate public key from private key
    babyJubjubPubKey := babyJubjubPrivKey.Public()

    // print public key

Here is an example of a public key generated using Baby Jubjub:


The executable code can be found here