Passport
  • 👩‍💻Welcome
  • How Passport Works
    • Overview
    • Background
      • Threshold Cryptography
      • Secure Multi-Party Computation
      • Distributed Architecture
      • Secure Enclaves
    • In Depth
      • Under the Hood
      • User Flows and Account Controls
      • The Halides Model
      • End-to-End Encryption
      • Security
      • Node Operation
  • guides and examples
    • Getting Started
    • Quickstarts and Examples
      • Passkey Account
      • Clerk Auth
      • Lambda Quickstart
  • Authentication
    • Overview
    • Configuring your scope
    • Passkeys
      • Registration
        • Register using SDK
        • Register using API
          • Initiate Registration
          • Complete Registration
      • Authentication
        • Authenticating with SDK
        • Authenticating with API
          • Initiate Authentication
          • Complete Authentication
    • Developer Owned Auth
      • Registration
        • Register using SDK
        • Register using API
          • Delegate Registration
  • Wallet Operations
    • Overview
    • Passkeys Signer
      • Sign Message
        • Sign Message SDK
        • Sign Message API
      • Sign Transaction
        • Sign Transaction SDK
        • Sign Transaction API
    • DOA Signer
      • Sign Message
        • Sign Message SDK
        • Sign Message API
      • Sign Transaction
        • Sign Transaction SDK
        • Sign Transaction API
    • Viem Support
  • Programmability
    • Overview
    • Passport Lambda
    • Lambda Functions
      • Create Lambda
        • Create Lambda SDK
        • Create Lambda API
      • Execute Lambda
        • Execute Lambda SDK
        • Execute Lambda API
      • List Lambda
        • List Lambda SDK
        • List Lambda API
  • Appendix
    • Moving to Mainnet
    • State Of The Network
    • Generating DOA Keys
    • API Request Setup
      • Unauthenticated Requests
      • Authenticated Requests
Powered by GitBook
On this page
  • Generate the PEM Key
  • Using Passport SDK
  • Using OpenSSL
  • Base64 encode the Key
  1. Appendix

Generating DOA Keys

In order to use DOA, you need to pass the base64 encoded private key. Here is how you generate your private key:

Generate the PEM Key

Using Passport SDK

Install passport-scope-cli

npm install -g passport-scope-cli
yarn global add passport-scope-cli
pnpm install -g passport-scope-cli

Run the generate key command

passport-scope generate-keys --name passport

Post this, your private key file will be created in the same directory with name passport_priv.der

Using OpenSSL

openssl ecparam -name prime256v1 -genkey -noout -out private_key.pem
openssl pkcs8 -topk8 -inform PEM -outform DER -in private_key.pem -out passport_priv.der -nocrypt

Base64 encode the Key

base64 -i passport_priv.der -o pasport_priv_base64.txt

And you are done, you may copy this value directly to your environment variable

PreviousState Of The NetworkNextAPI Request Setup

Last updated 1 year ago