Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ it does use npm to manage its dependencies
## Build

```sh
$ npm install -g iced-coffee-script
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove these changes? I'm assuming you've installed node as your user and it's in your path.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will remove this.

$ sudo npm install -g iced-coffee-script
$ npm install -d
$ icake build
```
Expand All @@ -27,6 +28,8 @@ To generate our reference test vectors, we use the reference Scrypt implementati
Python PBKDF2, and a Python library to turn a seed into a keypair. To see how this works, try:

```sh
$ pip install virtualenv
$ sudo /usr/bin/easy_install virtualenv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this line needed?

Copy link
Author

@gallizoltan gallizoltan Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed only at the first run.

$ cd test/gen && make build && make spec
```

Expand Down
5 changes: 3 additions & 2 deletions test/gen/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

SHELL := /bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed? I use sh

Copy link
Author

@gallizoltan gallizoltan Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this the make build fails with this message:

/bin/sh: 1: source: not found
Makefile:15: recipe for target 'build-python' failed
make: *** [build-python] Error 127

I googled for "/bin/sh: 1: source: not found" and found this solution:
https://stackoverflow.com/questions/670191/getting-a-source-not-found-error-when-using-source-in-a-bash-script

I don'n know, I have a Ubuntu 16.04 LTS. What environment are you using for sh to find source?

SCRYPT_DIR=../../node_modules/triplesec/contrib/scrypt-1.1.6
SCRYPT=${SCRYPT_DIR}/scrypt
PBKDF2=./pbkdf2.py
BU=py-venv/bin/bu
KU=py-venv/bin/ku

build: build-scrypt build-python

Expand All @@ -17,6 +18,6 @@ input:
iced gen_input.iced > input.json

spec:
(source py-venv/bin/activate && iced gen_spec.iced ${SCRYPT} ${PBKDF2} ${BU} > ../spec.json)
(source py-venv/bin/activate && iced gen_spec.iced ${SCRYPT} ${PBKDF2} ${KU} > ../spec.json)

.PHONY: build-scrypt build-python build
10 changes: 5 additions & 5 deletions test/gen/gen_spec.iced
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ class Runner
for line in out.join("\n").split(/\n+/) when line.length
[key,val] = line.split(/:\s+/)
if key[0] is ' '
bu_out[last_key][key.replace(/\s+/, '')] = val
bu_out[last_key][key.replace(/^\s+|\s+$/g, '')] = val
else
last_key = key
bu_out[key] = { _ : val}
last_key = key.replace(/\s+$/, '')
bu_out[last_key] = { "value" : val}

cb {
"private" : bu_out.WIF.uncompressed
"public" : bu_out['Bitcoin address'].uncompressed
"private" : bu_out.wif.uncompressed
"public" : bu_out['Bitcoin address uncompressed'].value
}

#-------------------
Expand Down