Socket
Book a DemoInstallSign in
Socket

@0xpolygonid/aws-nitro-enclaves-nsm-node

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xpolygonid/aws-nitro-enclaves-nsm-node

A Node.js addon for interacting with the Nitro Secure Module, which provides Nitro Enclaves with attestation capability.

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

AWS Nitro Enclaves NSM for Node.js

https://github.com/wei-rong-1/aws-nitro-enclaves-nsm-node/actions

A Node.js addon for interacting with the Nitro Secure Module, which provides Nitro Enclaves with attestation capability. napi-rs based, only for Linux.

Features

  • PCR query and manipulation
  • Attestation
  • Entropy

Please refer to aws/aws-nitro-enclaves-nsm-api.

For Attestation Document details, check the following document: Nitro Enclaves Attestation Process

Install this package

npm install --save aws-nitro-enclaves-nsm-node

yarn add aws-nitro-enclaves-nsm-node

Support OS

node14node16node18
Linux x64 gnu
Linux x64 musl

Methods

open, alias init, Initialization function.

close, alias exit, Exit function.

extendPcr, NSM ExtendPCR operation.

getPcrDescription, NSM DescribePCR operation.

lockPcr, NSM LockPCR operation.

lockPcrs, NSM LockPCRs operation.

getDescription, NSM Describe operation.

getAttestationDoc, NSM GetAttestationDoc operation.

getRandom, NSM GetRandom operation. Returns up to 256 bytes of random data.

Examples

import {
  open,
  close,
  extendPcr,
  getPcrDescription,
  lockPcr,
  lockPcrs,
  getDescription,
  getAttestationDoc,
  getRandom
} from "aws-nitro-enclaves-nsm-node"

const fd = open()

// extendPcr
// getPcrDescription
// lockPcr
// lockPcrs
// getDescription
// getRandom

const attestationDoc = getAttestationDoc(
  fd,
  Buffer.from("hello world"),   // user data
  null,                         // nonce
  Buffer.from("my public key"), // public key
)

console.log(attestationDoc)


close(fd)

Develop requirements

  • Install the latest Rust
  • Install Node.js@12+ which fully supported Node-API v4
  • Install yarn@1.x

How to build

  • yarn
  • yarn build

Lisence

MIT

Keywords

AWS Nitro Enclave

FAQs

Package last updated on 30 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts