项目作者: alokmenghrajani

项目描述 :
Running Rust code on nCipher HSMs (using CodeSafe).
高级语言: Shell
项目地址: git://github.com/alokmenghrajani/ncipher_rust.git
创建时间: 2021-03-30T20:01:55Z
项目社区:https://github.com/alokmenghrajani/ncipher_rust

开源协议:Apache License 2.0

下载


Rust on nCipher 🦀🛡️

Running Rust code on nCipher HSMs (using CodeSafe).

Context

We tend to write CodeSafe code in C (e.g. see Subzero,
Square’s HSM-based Bitcoin Cold Storage wallet). This repo is a prototype
showing how the same result could be achieved using Rust.

The main appeal for using Rust is memory safety/better guarantees compared
to C. Rust also enables leveraging a rich ecosystem of packages and libraries.

Try it out

Compile the Rust code with:

  1. install Docker
  2. git clone https://github.com/alokmenghrajani/ncipher_rust.git
  3. get CodeSafe-linux64-dev-12.50.2.iso from your vendor and drop it in the codesafe/ folder
  4. ./codesafe/build.sh
  5. ./rust/build.sh
  6. docker run --rm -it -v $PWD/demo:/demo ncipher-rust /demo/compile.sh

Run on the device with the nCipher HSM:

  1. scp -r demo <host>:~/
  2. ssh <host>
  3. $ cd ./demo
  4. $ ./run.sh