DIGIT Specifications
PlatformUrbanHealthPublic FinanceSanitation
  • Specifications Overview
    • Standardisation Approach
  • Common Service Specs
    • Access Control
    • Analytics
    • Billing
    • Collection
    • Dashboard Analytics
    • Decision Support System Ingest
    • Document Controller
    • Employee
    • Encryption
    • Filestore
    • ID Generation
    • Inbox
    • Indexer
    • Master
    • Master Data Management
    • OTP
    • Payment Gateway
    • PDF Generation
    • URL Shortening
    • User
    • Workflow
  • Domain Service Specs
    • Attendance
    • Bank Account
    • Billing Calculator
    • Birth-Death
    • Building Plan Approval
    • Building Plan Calculator
    • Campaign
    • Campaign Delivery
    • Contracts
    • Estimates
    • eChallan
    • Facility
    • Faecal Sludge Management (FSM)
    • Fire NOC
    • Fire NOC Calculator
    • Household
    • Individual
    • Inventory
    • Land
    • Muster Roll
    • National Dashboard Ingest
    • No Objection Certificate
    • Organization
    • Planning
    • Product
    • Project
    • Property Registry
    • Property Tax Calculator
    • Public Grievance Redressal
    • Registration
    • Sewerage Connection
    • Stock
    • Supervision
    • Sync
    • Trade Licence
    • Trade Licence Calculator
    • User Events
    • Vehicle Registration
    • Vendor Registration
    • Water Connection
  • Archived-docs
    • DIGIT Urban Service Specs
      • Property Tax Service
        • Property Tax Taxonomy
        • Property Tax Data Model
        • Property Tax Service API
      • Public Grievance Redressal Service
        • Public Grievance Redressal Taxonomy
        • Public Grievance Redressal Data Model
        • Public Grievance Redressal Service API
      • Trade License Service
        • Trade License Taxonomy
        • Trade License Data Model
        • Trade License API
      • Fire NOC Service
        • Fire NOC Taxonomy
        • Fire NOC Data Model
        • Fire NOC API
      • Miscellaneous Collection Service
        • Miscellaneous Collections Taxonomy
        • Miscellaneous Collections Data Model
        • Miscellaneous Collection API
      • Online Building Plan Approval Service
        • Online Building Plan Approval Taxonomy
        • Online Building Plan Approval Data Model
        • Online Building Plan Approval Service API
      • Water & Sewerage Service
        • Water & Sewerage Taxonomy
        • Water Service Data Model
        • Sewerage Service Data Model
        • Water & Sewerage Service API
      • Birth & Death Service
        • Birth & Death Taxonomy
        • Birth & Death Data Model
        • Birth & Death Service API
    • DIGIT Public Finance Management Service Specs
      • iFIX Master Data Service API
      • Adapter Master Data Service API
      • mGramSeva iFIX Adapter Service API
      • iFIX Department Entity Service API
      • Fiscal Event API
    • DIGIT Health Service Specs
      • Health Service Data Model
      • Health Service API
    • DIGIT Sanitation Service Specs
      • Faecal Sludge Management Service
        • Faecal Sludge Management Data Model
        • Faecal Sludge Management Service API
Powered by GitBook

​All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page

Was this helpful?

Export as PDF
  1. Common Service Specs

Encryption

PreviousEmployeeNextFilestore

Last updated 1 year ago

Was this helpful?

Encryption Service

API specs to encrypt, decrypt, sign and verify data.

  • Encryption Service
  • POSTDecrypts the given input value/s OR values of the object.
  • POSTProvide signature for a given value.
  • POSTCheck if the signature is correct for the provided value.
  • POSTDeactivate the keys for the given tenant and generate new keys. It will deactivate both symmetric and asymmetric keys for the provided tenant.
  • POSTcryptoRotateAllKeys

Decrypts the given input value/s OR values of the object.

post
Body
object[]Optional
Responses
200
The response to a decryption request will have the same structure as the input.
application/json
Responseobject[]
post
POST /crypto/v1/_decrypt HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 215

[
  [
    "896077|I/8Xwqr5MwB6UucEP8/Q5wiCHpbaNqGE",
    "896077|I+gMx6TjN0BcLxudEiYQKIDKtSlmpJY="
  ],
  {
    "userObject1": {
      "mobileNumber": "395551|eSfiPrQ1UK07d0SupYQYqbr2QFNOWSuYJYcU",
      "name": "395551|CnCzaK1ADfnx+4FINXIQ9zjnUs1ieAtz"
    }
  }
]
200

The response to a decryption request will have the same structure as the input.

[
  [
    "Personal",
    "Private"
  ],
  {
    "userObject1": {
      "mobileNumber": "98989121234",
      "name": "John Doe"
    }
  }
]

Provide signature for a given value.

post
Body

A Sign request containing tenant id and the string value to be signed.

tenantIdstringOptional

The key used for signing will be determined based on tenant id.

valuestringOptional

The value to be signed.

Responses
200
Response contains the value that has been signed and the value of signature.
application/json
post
POST /crypto/v1/_sign HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "tenantId": "pb.amritsar",
  "value": "claim"
}
200

Response contains the value that has been signed and the value of signature.

{
  "value": "claim",
  "signature": "436958|JLXQk7KP0y1nU3YHKLe0aq7EJp1iPEfNcIrbsgBh2u2U9aLCYfr8tVWGPud7JNQ5uiKJ1gTMFgzGU4XfTwUZDENHQ6mpFOhxH+LVVggj9QmDZk629ce2X7ju4aHuX6WDBx9/bxHstE8r5F47sP7f6ryY52HDQ5D5/8b7SX3WkkE="
}

Check if the signature is correct for the provided value.

post
Body

A Verify request containing the value and its corresponding signature.

valuestringOptional

The claim to be verified

signaturestringOptional

The signature for the claim

Responses
200
Response returns if the provided signature is correct for the given value.
application/json
post
POST /crypto/v1/_verify HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 211

{
  "value": "claim",
  "signature": "436958|JLXQk7KP0y1nU3YHKLe0aq7EJp1iPEfNcIrbsgBh2u2U9aLCYfr8tVWGPud7JNQ5uiKJ1gTMFgzGU4XfTwUZDENHQ6mpFOhxH+LVVggj9QmDZk629ce2X7ju4aHuX6WDBx9/bxHstE8r5F47sP7f6ryY52HDQ5D5/8b7SX3WkkE="
}
200

Response returns if the provided signature is correct for the given value.

{
  "verified": true
}

Deactivate the keys for the given tenant and generate new keys. It will deactivate both symmetric and asymmetric keys for the provided tenant.

post
Body

A request to rotate key for a given tenant

tenantIdstringOptional

The tenantId for which the key needs to be changed.

Responses
200
Acknowldgement if the operation was successful.
application/json
post
POST /crypto/v1/_rotatekey HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 26

{
  "tenantId": "pb.amritsar"
}
200

Acknowldgement if the operation was successful.

{
  "acknowledged": true
}

cryptoRotateAllKeys

post
Body

A request to rotate key for a given tenant

tenantIdstringOptional

The tenantId for which the key needs to be changed.

Responses
200
OK
*/*
201
Created
401
Unauthorized
403
Forbidden
404
Not Found
post
POST /crypto/v1/_rotateallkeys HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 26

{
  "tenantId": "pb.amritsar"
}
{
  "acknowledged": true
}