Skip to content

alokmenghrajani/ncipher_rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

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 <host>:~/
ssh <host>
$ cd ./demo
$ ./run.sh

About

Running Rust code on nCipher HSMs (using CodeSafe).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published