Norsh
Home
NTPNCLAPI
Home
NTPNCLAPI
  1. Keys Identity
  • Norsh
    • Usage Guide
      • Identity in the Norsh Ecosystem
      • UCP Message Structure (Standard Request Format)
    • API
      • UCP Error Codes
      • Keys Identity
        • Generates a public and private key pair
          POST
      • Address
        • Register Address
        • Get Address
        • Enable TOTP
        • Disable TOTP
        • Enable Secret-Based Authentication
        • Disable Secret-Based Authentication
        • Revoke Address
      • Modules
        • Get Module
        • Create Notary
      • Statements
        • Get Statement
        • Create Notary Statement
      • BigLedger
        • Get BigLedger Statement
      • Tartarus
        • Get Tartarus Statement
      • Envelopes
        • Get Envelope
  • NTP - Norsh Technical Paper
    • NTP-1: Norsh Technical Paper Specification
    • NTP-2: Standards for Encoding, Time and Localization
    • NTP-3: Cryptography and Hash Specification
    • NTP-4: Interchangeable Data Standard
    • NTP-5: Temporal Time-Step Model
    • NTP-6: Modular Prime Fragmentation
    • NTP-7: The End of Mining - PoW
    • NTP-8: The Fallacy of Stake - PoS
    • NTP-9: The Myth of Absolute Non-Censorship
    • NTP-10: Structural Failures of Decentralization
    • NTP-11: Universal Blockchain Protocol (UBP)
    • NTP-12: Sharded Certificate Storage for the Norsh Ecosystem
  • NCL - Norsh Commons License
    • NCL-0: Norsh Commons License
    • NCL-1: Attribution Requirement
    • NCL-2: Restricted Commercialization
    • NCL-4: Commercialization with Agreement or Royalties
    • NCL-8: Educational Use Permission
    • NCL-16: Complementary Use and Integration Permission
    • NCL-32: Pre-Approval for Application Publication
    • NCL-64: Restricted or Authorized Derivatives
    • NCL-128: Contribution Terms
  • Compliance
    • Terms of Use
    • Privacy Policy
    • Norsh Brand and Trademark Usage Guidelines
    • AI Content Notice
    • Credits
    • Partners
    • Legal Templates
      • Policy on Public Disclosure of Legal Templates
      • NDA - Template
      • Service Agreement - Template
  • Resources
    • Norsh Brand Guidelines
    • Academy
      • Exam Program
  • Service Operations
    • Service Level Agreement (SLA)
    • Scheduled Maintenance Notice
    • Incident Reports
  • Schemas
    • Key & Address
      • Key.Generate
      • Address.Register
      • Address.Revoke
      • Address.TOTP.Enable
      • Address.TOTP.Disable
      • Address.Secret.Enable
      • Address.Secret.Disable
    • Modules
      • Module.Notary.Create
      • Module.Meter.Create
    • Ucp Response
    • Ucp PublicKey
    • Ucp Parameters
    • Ucp Header
    • Ucp Ghost
Home
NTPNCLAPI
Home
NTPNCLAPI
  1. Keys Identity

Generates a public and private key pair

POST
https://sandbox.norsh.org/{network}/v1/ucp
Last modified:2025-10-30 14:30:30
This API generates a new elliptic curve (EC) key pair using the secp384r1 curve (NIST P-384). The result includes the public and private keys in Base64, Hexadecimal, and PEM formats. The endpoint supports both individual and batch requests, and allows optional password protection for the private key.
Request:
This endpoint uses the UCP standard request format. In addition to the standard fields, specify the following fields for this operation:
command: Set to key.generate
The ghost.password field is optional. If provided, the private key will be encrypted in the response.
The fields publicKey and signature are not required for this operation.
Response:
The response includes the keys in multiple formats. If a password is provided, the private key will be encrypted accordingly.

Official Key Generation Libraries#

For secure, Norsh-compliant key generation and signature creation, you can use the official open-source libraries provided by the Norsh project. These libraries generate keys and signatures locally (offline), following the same cryptographic standards as the platform.
Node.js: @norsh/norsh-keygen (GitHub)
Java: norsh-keygen-java
Python: norsh-keygen-python
C#: norsh-keygen-csharp
All libraries are open source and available at github.com/norsh-org.

Request

Path Params

Body Params application/vnd.ucp+json

Examples

Responses

🟢200Success
application/vnd.ucp+json
Body

🟢207Multi-Status
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://sandbox.norsh.org/main/v1/ucp' \
--header 'Content-Type: application/vnd.ucp+json' \
--data-raw '[
    {
        "command": "key.generate",
        "version": 1,
        "ghost": {
            "password": "norsh@2025"
             
        }
    }
]'
Response Response Example
200 - Success
[
    {
        "command": "key.generate",
        "version": 1,
        "status": 200,
        "success": true,
        "result": {
            "info": {
                "provider": "BC",
                "keyAlgorithm": "EC",
                "algorithm": "SHA3-384withECDSA",
                "curve": "secp384r1",
                "cipher": "AES-256-CBC",
                "prf": "HMAC-SHA3-384",
                "iterations": 65536
            },
            "base64": {
                "privateKey": "MIIBVzCBgQYJKoZIhvcNAQUNMHQwUwYJKoZIhvcNAQUMMEYEMFT1LZlH++T3w/R9IYy7cxlEsDKaYDPyVAlycXk7Z2KlRCUAWE8+wjCA0YEzbOu1QQIDAQAAMA0GCWCGSAFlAwQCDwUAMB0GCWCGSAFlAwQBKgQQk/fyH784jm9N4u09t6DeawSB0NiTuyx3B4ou0N9APJkj3iMJZmdoW10L+lfSk/kK/NyBreY2rvrtTlsRILQhH71aUBo+yC8BTLeqaN+Ui1y03O5/uUJdNw1GTw5igFIs9Vdvm0teP2dTqrhWqoAB2Tzs5m00MhvJw6O++Z1ulWUuCtgDzk0ybtXuGvCuS/uEt48rB30B6Vq+SCELG2/uHmqUG1Xpl2+JuM1Hiwu1a23/Ao7lXfF5hl5zvfv30umfo8MCJ/ctOJl55lIKsJtwXM28Jrrz3kFavqnNcR4VAa04zo0=",
                "publicKey": "MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEoVOBV/Ji7NfdOA8RAqpvqLQ7qnzuUHESOL/6Oosdg4/un0+YU+7QVX5L3sjXbbxYLQeYa4XPI7n5pKKOxNn2Qu7rsvY+CkHXW+lxzGKen9JA4EfnlWteM5KI3JYvH/Pj"
            },
            "hex": {
                "privateKey": "3082015730818106092a864886f70d01050d3074305306092a864886f70d01050c3046043054f52d9947fbe4f7c3f47d218cbb731944b0329a6033f254097271793b6762a5442500584f3ec23080d181336cebb5410203010000300d060960864801650304020f0500301d060960864801650304012a041093f7f21fbf388e6f4de2ed3db7a0de6b0481d0d893bb2c77078a2ed0df403c9923de23096667685b5d0bfa57d293f90afcdc81ade636aefaed4e5b1120b4211fbd5a501a3ec82f014cb7aa68df948b5cb4dcee7fb9425d370d464f0e6280522cf5576f9b4b5e3f6753aab856aa8001d93cece66d34321bc9c3a3bef99d6e95652e0ad803ce4d326ed5ee1af0ae4bfb84b78f2b077d01e95abe48210b1b6fee1e6a941b55e9976f89b8cd478b0bb56b6dff028ee55df179865e73bdfbf7d2e99fa3c30227f72d389979e6520ab09b705ccdbc26baf3de415abea9cd711e1501ad38ce8d",
                "publicKey": "3076301006072a8648ce3d020106052b8104002203620004a1538157f262ecd7dd380f1102aa6fa8b43baa7cee50711238bffa3a8b1d838fee9f4f9853eed0557e4bdec8d76dbc582d07986b85cf23b9f9a4a28ec4d9f642eeebb2f63e0a41d75be971cc629e9fd240e047e7956b5e339288dc962f1ff3e3"
            },
            "pem": {
                "privateKeyFormat": {
                    "encoding": "PKCS#8",
                    "encrypted": true
                },
                "privateKey": "-----BEGIN ENCRYPTED PRIVATE KEY-----\nMIIBVzCBgQYJKoZIhvcNAQUNMHQwUwYJKoZIhvcNAQUMMEYEMFT1LZlH++T3w/R9IYy7cxlEsDKaYDPyVAlycXk7Z2KlRCUAWE8+wjCA0YEzbOu1QQIDAQAAMA0GCWCGSAFlAwQCDwUAMB0GCWCGSAFlAwQBKgQQk/fyH784jm9N4u09t6DeawSB0NiTuyx3B4ou0N9APJkj3iMJZmdoW10L+lfSk/kK/NyBreY2rvrtTlsRILQhH71aUBo+yC8BTLeqaN+Ui1y03O5/uUJdNw1GTw5igFIs9Vdvm0teP2dTqrhWqoAB2Tzs5m00MhvJw6O++Z1ulWUuCtgDzk0ybtXuGvCuS/uEt48rB30B6Vq+SCELG2/uHmqUG1Xpl2+JuM1Hiwu1a23/Ao7lXfF5hl5zvfv30umfo8MCJ/ctOJl55lIKsJtwXM28Jrrz3kFavqnNcR4VAa04zo0=\n-----END ENCRYPTED PRIVATE KEY-----",
                "publicKeyFormat": {
                    "encoding": "X.509"
                },
                "publicKey": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEoVOBV/Ji7NfdOA8RAqpvqLQ7qnzuUHESOL/6Oosdg4/un0+YU+7QVX5L3sjXbbxYLQeYa4XPI7n5pKKOxNn2Qu7rsvY+CkHXW+lxzGKen9JA4EfnlWteM5KI3JYvH/Pj\n-----END PUBLIC KEY-----"
            }
        },
        "tail": {
            "duration": 1455
        }
    }
]
Modified at 2025-10-30 14:30:30
Previous
Keys Identity
Next
Address
Built with