https://github.com/alokmenghrajani/ncipher_rust
Running Rust code on nCipher HSMs (using CodeSafe).
https://github.com/alokmenghrajani/ncipher_rust
hardware-security-module hsm ncipher rust
Last synced: about 1 year ago
JSON representation
Running Rust code on nCipher HSMs (using CodeSafe).
- Host: GitHub
- URL: https://github.com/alokmenghrajani/ncipher_rust
- Owner: alokmenghrajani
- License: apache-2.0
- Created: 2021-03-30T20:01:55.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-03T06:09:58.000Z (about 5 years ago)
- Last Synced: 2025-03-26T00:03:05.482Z (about 1 year ago)
- Topics: hardware-security-module, hsm, ncipher, rust
- Language: Shell
- Homepage:
- Size: 416 KB
- Stars: 10
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust on nCipher 🦀🛡️
Running Rust code on nCipher HSMs (using CodeSafe).
# Context
We tend to write CodeSafe code in C (e.g. see [Subzero](https://github.com/square/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:
```
install Docker
git clone https://github.com/alokmenghrajani/ncipher_rust.git
get CodeSafe-linux64-dev-12.50.2.iso from your vendor and drop it in the codesafe/ folder
./codesafe/build.sh
./rust/build.sh
docker run --rm -it -v $PWD/demo:/demo ncipher-rust /demo/compile.sh
```
Run on the device with the nCipher HSM:
```
scp -r demo :~/
ssh
$ cd ./demo
$ ./run.sh
```