Skip to content

Commit

Permalink
Alpha Release (#108)
Browse files Browse the repository at this point in the history
* use btree and serialize client.

* clean up cosmetics.

* move and expose location.

* fix bench and add read.

* add init and create benches.

* fix cli.

* fix(tests): don't run them all all the time (#76)

* fix(tests): don't run them all all the time

* fix(workflow): test, not build and test

* Unify API and harden client.  (#78)

* use btree and serialize client.

* clean up cosmetics.

* move and expose location.

* fix bench and add read.

* add init and create benches.

* fix cli.

* fix(covector) (#79)

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* fix covector (#81)

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* fix(covector) (#82)

* fix(covector) (#83)

* fix(covector): cargo.toml styles (#85)

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* fix counter logic.

* add reference changes.

* add multi-actor example.

* test reading snapshot into a new actor.

* allow new actor to read old snapshot.

* cleanup.

* fix errors.

* fix return error.

* remove lifetimes.

* fix benchmark.

* fix switch.

* remove runtime.

* fix location api.

* clippity clip clip.

* chore(communication): bump libp2p version (#88)

* chore(communication): bump libp2p version

* chore(communication): bump libp2p version

* add write_all_snapshot and rework read_snapshot.

* cleanup.

* clippy clippy clippy clippy clippy clippy clippy clippy clippy clippy

* fix(clippy): complexity & clone

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* fix(commandline): update to new signature

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* fix cli

* add counter test.

* add new test.

* fix snapshot logic.

* add todo.

* The droid was excited by the meal I cooked him, until he took a byte.

* clippy clip clipped

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* fix fmt

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* add forth actor and fix test.

* feat(target): arm-unknown-linux-gnueabihf target for usbarmory (#90)

* feat(target): arm-unknown-linux-gnueabihf target for usbarmory

* add changelog

* feat(client): introduce SignUnlockBlock proc (#92)

* feat(client): introduce SignUnlockBlock proc
* changelog
* fix(fmt)
* feat(client): do a proper slip10 proc
* add test and fix length error.

Co-authored-by: tensor-programming <tensordeveloper@gmail.com>

* fix snapshot.

* move tests to external folder.

* move cli to examples folder.

* Every year they read, "All about Robots," by Cy Borg

* remove cli release workflow.

* restore cli.

* remove examples/commandline.

* add license

* add basic tests and benchmarks.

* add basic test docs.

* add snapshot hack.

* feat(communication): refactor comms actor

* fix(communication): add changelog

* Refactor zone API and add documentation (#95)

* Unify zone interface around a common abstract ZoneSpec type

* Add some basic tests for the common zone API

* Add the license_template to the runtime crate

* Rewrite the runtime's README.md

* typo

* typo

* Bump crypto.rs version (#96)

iotaledger/crypto.rs@9259a06

* Snapshot docs (#84)

* Remove unused code and make room for the new format documentation

* Add some words about the snapshot format

* Document the snapshot::files::* functions

* Clearer separation of concerns regarding the snapshot paths

* Add some words for the snapshot's read/write read_from/write_to functions

* Expose the MAGIC and VERSION bytes (as they may be used for file type detection)

* Apply suggestions from code review

* Re-export the kdf:s from snapshot in the client crate

* Feat/client docs (#97)

* add constant locations.

* add engine bench.

* slip10 derive return key.

* add external documentation.

* add liscence.

* Sy Borg, gimme dat give me the chromium leg

* feat(communication): Update examples and docs

* feat(communication): Adjust actor-example and docs

* fix(communication): typos

* Attempted fix of the SignBlockUnlock message (#103)

* Correct naming in the SignUnlockBlock message

* Use all available seed material when performing the SignUnlockBlock procedure

* fmt :|

* Fix Slip10Derive internal methods: hand back the keys

* Refactor Crypto and UnlockBlock (#104)

* add basic unlock block test.

* fix slip10 derive.

* cleanup zone warnings

* fix basic test.

* fix crypto logic.

* add bee test.

* reinsert keys.

* add bee logic.

* add bee-p logic and path.

* remove slip10 from test case.

* Sy Borg, gimme dat, gimme dat

* It looks just like a TeleFunken you-47

* chore(release) (#105)

* chore(release)
* fix(cli): release on push to main
* fix typo
* fix(runtime): allow dead code
* release title "Saint Malo"

* fix(changelog): Alpha Release (#106)

LGTM

* apply version updates (#86)

Co-authored-by: Daniel Thompson-Yvetot

* fix(cargo) (#107)

Signed-off-by: Daniel Thompson-Yvetot

Co-authored-by: tensor-programming <tensordeveloper@gmail.com>
Co-authored-by: elenaf9 <57632201+elenaf9@users.noreply.github.com>
Co-authored-by: elenaf9 <elena.frank@protonmail.com>
Co-authored-by: Gustav Behm <rootmos@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
6 people authored Dec 24, 2020
1 parent f0c3abc commit 8312625
Show file tree
Hide file tree
Showing 97 changed files with 3,770 additions and 2,954 deletions.
3 changes: 3 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

6 changes: 0 additions & 6 deletions .changes/2020-11-30T-client-changelog.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changes/add-covector.md

This file was deleted.

4 changes: 0 additions & 4 deletions .changes/add-libp2p-communication.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changes/hd.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changes/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| iota-stronghold | The Client | Rust | Yes | Yes |
| stronghold-engine | The Engine | Rust | Yes | Yes |
| stronghold-runtime | Secure Zone | Rust | Yes | No |
| stronghold-communicaton | Communication Subsystem | Rust | Yes | No |
| stronghold-communication | Communication Subsystem | Rust | Yes | No |
| crypto | Engine's internal Crypto | Rust | No | No |
| vault | Engine's memory Store | Rust | No | No |
| snapshot | Engine's Persistence | Rust | No | No |
Expand Down
42 changes: 5 additions & 37 deletions .github/workflows/covector-status.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: version or publish

name: status
on:
push:
branches:
- dev

jobs:
version-or-publish:

update-changelog:
runs-on: ubuntu-latest
timeout-minutes: 65
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}

steps:
- uses: actions/checkout@v2
Expand All @@ -22,8 +22,7 @@ jobs:
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
- name: cargo login
run: cargo login ${{ secrets.crate_token }}

- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
Expand All @@ -37,7 +36,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'version-or-publish'
createRelease: true

- name: Create Pull Request With Versions Bumped
if: steps.covector.outputs.commandRan == 'version'
uses: tauri-apps/create-pull-request@v3.4.1
Expand All @@ -48,34 +47,3 @@ jobs:
commit-message: "apply version updates"
labels: "version updates"
body: ${{ steps.covector.outputs.change }}

tangle:
runs-on: ubuntu-latest
needs: version-or-publish
if: needs.version-or-publish.outputs.successfulPublish == 'true'
strategy:
fail-fast: false
matrix:
package:
- name: iota-stronghold
registryName: iota-stronghold
- name: stronghold-engine
registryName: stronghold-engine
- name: stronghold-runtime
registryName: stronghold-runtime

steps:
- uses: actions/checkout@v2
- run: echo ::set-env name=PUBLISHED::$(jq '.${{ matrix.package.name }}.command' ${{ needs.version-or-publish.outputs.change }})
- run: echo ::set-env name=PACKAGE_VERSION::$(jq '.${{ matrix.package.name }}.pkg.pkgFile.version' ${{ needs.version-or-publish.outputs.change }})
- name: Tangle Release
if: env.PUBLISHED != 'false' && startsWith(env.PUBLISHED, 'parse error') != true && startsWith(env.PACKAGE_VERSION, 'parse error') != true
id: tangle_release
uses: iotaledger/gh-tangle-release@v0.6.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IOTA_SEED: ${{ secrets.IOTA_SEED }}
IOTA_NODE: "https://iotanode.us:14267"
with:
tag_name: ${{ matrix.package.name }}-v${{ env.PACKAGE_VERSION }}
comment: "Release ${{ matrix.package.name }} v${{ env.PACKAGE_VERSION }}"
69 changes: 52 additions & 17 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,82 @@
name: covector version or publish
name: publish
on:
push:
branches:
- main

jobs:
covector:
version-or-publish:
runs-on: ubuntu-latest
timeout-minutes: 65
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14
registry-url: 'https://registry.npmjs.org'
- name: cargo login
run: cargo login ${{ secrets.crate_token }}
- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
- run: yarn
- run: yarn workspace action build
- name: covector version-or-publish
uses: ./packages/action
- name: covector version or publish (publish when no change files present)
uses: jbolda/covector/packages/action@covector-v0
id: covector
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
CARGO_AUDIT_OPTIONS: ${{ secrets.CARGO_AUDIT_OPTIONS }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'version-or-publish'
createRelease: true
- name: dump covector output
env:
COVECTOR_CONTEXT: ${{ toJson(steps.covector) }}
run: echo "$COVECTOR_CONTEXT"
- name: create pull request
id: cpr
uses: tauri-apps/create-pull-request@v3.4.1
- name: Create Pull Request With Versions Bumped
if: steps.covector.outputs.commandRan == 'version'
uses: tauri-apps/create-pull-request@v3.4.1
with:
title: "Publish New Versions"
commit-message: "publish new versions"
token: ${{ secrets.GITHUB_TOKEN }}
branch: release/version-updates
title: Apply Version Updates From Current Changes
commit-message: "apply version updates"
labels: "version updates"
branch: "release"
body: ${{ steps.covector.outputs.change }}

tangle:
runs-on: ubuntu-latest
needs: version-or-publish
if: needs.version-or-publish.outputs.successfulPublish == 'true'
strategy:
fail-fast: false
matrix:
package:
- name: iota-stronghold
registryName: iota-stronghold
- name: stronghold-engine
registryName: stronghold-engine
- name: stronghold-runtime
registryName: stronghold-runtime
- name: stronghold-communication
registryName: stronghold-communication

steps:
- uses: actions/checkout@v2
- run: echo ::set-env name=PUBLISHED::$(jq '.${{ matrix.package.name }}.command' ${{ needs.version-or-publish.outputs.change }})
- run: echo ::set-env name=PACKAGE_VERSION::$(jq '.${{ matrix.package.name }}.pkg.pkgFile.version' ${{ needs.version-or-publish.outputs.change }})
- name: Tangle Release
if: env.PUBLISHED != 'false' && startsWith(env.PUBLISHED, 'parse error') != true && startsWith(env.PACKAGE_VERSION, 'parse error') != true
id: tangle_release
uses: iotaledger/gh-tangle-release@v0.6.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IOTA_SEED: ${{ secrets.IOTA_SEED }}
IOTA_NODE: "https://iotanode.us:14267"
with:
tag_name: ${{ matrix.package.name }}-v${{ env.PACKAGE_VERSION }}
comment: "Release ${{ matrix.package.name }} v${{ env.PACKAGE_VERSION }}"
4 changes: 3 additions & 1 deletion .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Release Stronghold CLI

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and run tests
name: Test

on:
push:
Expand All @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
project: [engine, client, runtime, products/commandline]
project: [engine, client, runtime, communication, products/commandline]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand Down Expand Up @@ -69,14 +69,8 @@ jobs:
restore-keys: |
${{ matrix.project }}-${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
- name: Build ${{ matrix.project }}
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path=${{ matrix.project }}/Cargo.toml --all --release

- name: Run tests for ${{ matrix.project }}
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=${{ matrix.project }}/Cargo.toml --all --release
args: --manifest-path=${{ matrix.project }}/Cargo.toml --release
Binary file added .meta/stronghold_alpha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
![banner](./.meta/stronghold_banner.jpg)
![banner](./.meta/stronghold_alpha.png)

[![status](https://img.shields.io/badge/Status-Alpha-yellow.svg)](https://github.com/iotaledger/stronghold.rs)
![Audit](https://github.com/iotaledger/stronghold.rs/workflows/Audit/badge.svg?branch=dev)
![Test](https://github.com/iotaledger/stronghold.rs/workflows/Test/badge.svg)

## Introduction
[summary]: #summary
Expand All @@ -11,18 +15,21 @@ There are four main components of Stronghold:
3. **Runtime**: Is a process fork with limited permissions within which cryptographic operations take place
4. **Communication**: Enables Strongholds in different processes or on different devices to communicate with each other securely.

Read more about the [Alpha Release](https://blog.iota.org/stronghold-alpha-release/).

## WARNING
This library has not yet been audited for security, so use at your own peril. Until a formal third-party security audit has taken place, the IOTA Foundation makes no guarantees to the fitness of this library for any purposes.
These libraries are being prepared for a number of external security audits in early 2021, so they are not yet verifiably safe. Until this warning is removed, the IOTA Foundation makes no guarantees to the fitness of these libraries for any purposes.

As such they are to be seen as **experimental** and not ready for real-world applications.
As such, they are to be seen as **experimental** and not ready for real-world applications.

Nevertheless, we are very interested in feedback about the design and implementation, and encourage you to reach out with any concerns or suggestions you may have.

## Roadmap
Here are some of the features and tasks that we are working on.


#### Components
- [x] Engine (beta quality, fuzzed)
- [x] Engine
- [x] Client (with dual interfaces)
- [x] peer-to-peer communications
- [x] Secure runtime zone
Expand All @@ -37,7 +44,7 @@ Here are some of the features and tasks that we are working on.
- [x] Unit Tests
- [x] Lowlevel Library Fuzzing
- [ ] Realworld tests
- [ ] Multiplatform benchmarks
- [x] Multiplatform benchmarks
- [ ] Continuous Fuzzing

#### Applications
Expand All @@ -48,7 +55,7 @@ Here are some of the features and tasks that we are working on.
- [ ] C FFI bindings

### Hardware Integrations
- [ ] Works with USB Armory Mk II
- [x] Works with USB Armory Mk II
- [ ] Works with Yubikey
- [ ] Works with Ledger Nano X
- [ ] Use Secure Element to generate private keys for decryption
Expand All @@ -66,3 +73,5 @@ cargo test --all

## Joining the discussion
If you want to get involved in discussions about this technology, or you're looking for support, go to the #stronghold-discussion channel on [Discord](https://discord.iota.org/).

If you wish to join the Stronghold X-Team, please fill out [this form](https://forms.gle/AUdjcp4kCRLgG3Qd9).
19 changes: 19 additions & 0 deletions client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

## [0.2.0]

- Added the initial client logic and integrated it with the Riker actor model. Change includes a Client/Cache actor, a Bucket actor, a Snapshot actor, and a keystore actor. All of the Stronghold APIs are available.
- [7c7320a](https://www.github.com/iotaledger/stronghold.rs/commit/7c7320ab0bc71749510a590f418c9bd70329dc02) add client changelog. on 2020-11-30
- [4986685](https://www.github.com/iotaledger/stronghold.rs/commit/49866854f32dde8589f37c6d9ea0c2e7ddb3c461) remove todos and update readme. on 2020-11-30
- [7f1e9ed](https://www.github.com/iotaledger/stronghold.rs/commit/7f1e9edf5f5c5e148376575057a55d1d1398708a) Chore/covector fix ([#61](https://www.github.com/iotaledger/stronghold.rs/pull/61)) on 2020-12-01
- [f882754](https://www.github.com/iotaledger/stronghold.rs/commit/f88275451e7d3c140bbfd1c90a9267aa222fb6d0) fix(client): readme and changelog ([#64](https://www.github.com/iotaledger/stronghold.rs/pull/64)) on 2020-12-01
- Create SignUnlockBlock procedure.
- [f9d180a](https://www.github.com/iotaledger/stronghold.rs/commit/f9d180a85fe57c2942d6ebabfcfdb3c445b0ba5b) feat(client): introduce SignUnlockBlock proc ([#92](https://www.github.com/iotaledger/stronghold.rs/pull/92)) on 2020-12-21
- Alpha release of Stronghold: "Saint-Malo"
- [4b6f4af](https://www.github.com/iotaledger/stronghold.rs/commit/4b6f4af29f6c21044f5063ec4a8d8aff643f81a7) chore(release) ([#105](https://www.github.com/iotaledger/stronghold.rs/pull/105)) on 2020-12-24
- [06c6d51](https://www.github.com/iotaledger/stronghold.rs/commit/06c6d513dfcd1ba8ed6379177790ec6db28a6fea) fix(changelog): Alpha Release ([#106](https://www.github.com/iotaledger/stronghold.rs/pull/106)) on 2020-12-24
- Introduce release manager for rust crates including tangle registry.
- [c10811e](https://www.github.com/iotaledger/stronghold.rs/commit/c10811effbff396370762e76a2f2d44221dc7327) feat(covector): rigging ([#57](https://www.github.com/iotaledger/stronghold.rs/pull/57)) on 2020-11-29
- Add a hierarchical wallet implementation following SLIP10 for the Ed25519 curve.
- [dd12c16](https://www.github.com/iotaledger/stronghold.rs/commit/dd12c16d628ec996728d356cfb815f185cc5cc37) Add changelog message on 2020-12-02
- [d3c63be](https://www.github.com/iotaledger/stronghold.rs/commit/d3c63bec8052c0cd6a636fef3463b90893b55d4b) fix(covector) ([#82](https://www.github.com/iotaledger/stronghold.rs/pull/82)) on 2020-12-17
34 changes: 20 additions & 14 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
[package]
name = "iota-stronghold"
version = "0.1.0"
authors = ["tensorprogramming <tensordeveloper@gmail.com>", "Daniel Thompson-Yvetot <daniel.yvetot@iota.org>"]
version = "0.2.0"
authors = [
"tensorprogramming <tensordeveloper@gmail.com>",
"Daniel Thompson-Yvetot <daniel.yvetot@iota.org>"
]
edition = "2018"
license = "Apache-2.0"
readme = "README.md"
description = "Client interface for Stronghold"
keywords = ["iota", "stronghold", "security"]
keywords = [ "iota", "stronghold", "security" ]
categories = [ "security" ]
homepage = "https://iota.org"
repository = "https://github.com/iotaledger/stronghold.rs"

[dependencies]
stronghold-engine = {path = "../engine"}

bincode = "1.3"
serde = {version = "1.0", features = ["derive"]}
serde = { version = "1.0", features = [ "derive" ] }
zeroize = "1.1"
zeroize_derive = "1.0"
anyhow = "1.0"
thiserror = "1.0"
futures = "0.3"

riker = "0.4"
bee-signing-ext = { git = "https://github.com/wusyong/bee-p.git", branch = "sign-ext", version = "^0.1.0-alpha" }

[dependencies.stronghold-engine]
path = "../engine"
version = "0.2"

stronghold-runtime = {path = "../runtime"}
[dependencies.stronghold-runtime]
path = "../runtime"
version = "0.2"

[dependencies.iota-crypto]
git = "https://github.com/iotaledger/crypto.rs"
rev = "46128fc8ea08e251ab2506a3f591295a9673c7fc"
features = [ "random", "ed25519", "sha", "hmac", "bip39-en" ]
[dependencies.iota-crypto]
git = "https://github.com/iotaledger/crypto.rs"
rev = "9259a0617ca3b72e2bb2f63d5b7197247f85061c"
features = [ "random", "ed25519", "sha", "hmac", "bip39-en", "blake2b" ]

[dev-dependencies]
hex = "0.4.2"

criterion = "0.3.3"
clap = { version = "3.0.0-beta.1", features = [ "yaml" ] }

[[bench]]
name = "benchmark"
harness = false

Loading

0 comments on commit 8312625

Please sign in to comment.