Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "examples/lib/miracl-core"]
path = examples/lib/miracl-core
url = https://github.com/miracl/core.git
445 changes: 204 additions & 241 deletions draft-ietf-cose-bls-key-representations.md

Large diffs are not rendered by default.

103 changes: 103 additions & 0 deletions examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "cose-bls-key-representations-examples"
version = "0.1.0"
edition = "2024"

[dependencies]
base64 = "0.22.1"
mcore = { path = "./lib/miracl-core/rust/mcore" }
serde = "1.0.228"
serde_cbor = "0.11.2"
13 changes: 13 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

# Setup

```sh
$ ./setup.sh
```


# Running

```sh
$ cargo run
```
1 change: 1 addition & 0 deletions examples/lib/miracl-core
Submodule miracl-core added at 578550
13 changes: 13 additions & 0 deletions examples/miracl-sign.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/rust/fp.rs b/rust/fp.rs
index d6d4785..54dcdd6 100644
--- a/rust/fp.rs
+++ b/rust/fp.rs
@@ -68,7 +68,7 @@ pub const OMASK: Chunk = (-1) << (MODBITS % big::BASEBITS);
pub const TBITS: usize = MODBITS % big::BASEBITS; // Number of active bits in top word
pub const TMASK: Chunk = (1 << TBITS) - 1;

-pub const BIG_ENDIAN_SIGN: bool = false;
+pub const BIG_ENDIAN_SIGN: bool = true;

impl FP {
/* Constructors */
4 changes: 4 additions & 0 deletions examples/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

git submodule update --init --recursive lib/miracl-core
(cd lib/miracl-core/rust && git reset --hard && git clean -dfx . && git apply ../../../miracl-sign.patch && python3 config64.py 31 39)
Loading
Loading