Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kryptoxic committed Dec 1, 2019
2 parents 0916b3f + ff79d3c commit 6eb2123
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 192 deletions.
7 changes: 4 additions & 3 deletions Makefile
Expand Up @@ -39,10 +39,10 @@ endif

APPVERSION_M=1
APPVERSION_N=4
APPVERSION_P=0
APPVERSION_P=2

APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)
SPECVERSION="alpha"
SPECVERSION="1.0"

DEFINES += $(MONERO_CONFIG)
DEFINES += MONERO_VERSION_MAJOR=$(APPVERSION_M) MONERO_VERSION_MINOR=$(APPVERSION_N) MONERO_VERSION_MICRO=$(APPVERSION_P)
Expand Down Expand Up @@ -81,8 +81,9 @@ endif

DEFINES += OS_IO_SEPROXYHAL
DEFINES += HAVE_BAGL HAVE_SPRINTF
DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=6 IO_HID_EP_LENGTH=64 HAVE_USB_APDU
DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=4 IO_HID_EP_LENGTH=64 HAVE_USB_APDU
DEFINES += CUSTOM_IO_APDU_BUFFER_SIZE=\(255+5+64\)
DEFINES += HAVE_LEGACY_PID

DEFINES += USB_SEGMENT_SIZE=64
DEFINES += U2F_PROXY_MAGIC=\"MOON\"
Expand Down
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -14,6 +14,18 @@ Note this is only for testing. For production usage, use the application provide

# Revision

## V1.4.1

Compatibilty check with client version now discards the fourth sub-version number.

Release for client 0.15.0+
firmware LNS 1.6.0 et LNX 1.2.4

## V1.4.1

Release for client 0.15
firmware LNS 1.6.0 et LNX 1.2.4

## V1.4.0

Add address display
Expand Down
Binary file modified doc/developer/blue-app-commands.pdf
Binary file not shown.
29 changes: 14 additions & 15 deletions doc/developer/blue-app-commands.rst
Expand Up @@ -49,10 +49,10 @@

.. |x| replace:: :math:`\mathit{x}`
.. |ex| replace:: :math:`\widetilde{\mathit{x}}`
.. |x1| replace:: :math:`\mathit{x}`
.. |ex1| replace:: :math:`\widetilde{\mathit{x}}`
.. |x2| replace:: :math:`\mathit{x}`
.. |ex2| replace:: :math:`\widetilde{\mathit{x}}`
.. |x1| replace:: :math:`\mathit{x_1}`
.. |ex1| replace:: :math:`\widetilde{\mathit{x_1}}`
.. |x2| replace:: :math:`\mathit{x_2}`
.. |ex2| replace:: :math:`\widetilde{\mathit{x_2}}`
.. |P| replace:: :math:`\mathit{P}`
.. |xP| replace:: :math:`\mathit{xP}`
.. |G| replace:: :math:`\mathit{G}`
Expand Down Expand Up @@ -1247,7 +1247,7 @@ sc_add
**Description**

| compute |x1| = |dec|[|spk|](|ex1|)
| compute |x1| = |dec|[|spk|](|ex1|)
| compute |x2| = |dec|[|spk|](|ex2|)
| compute |x| = |x1| + |x2|
| compute |ex| = |enc|[|spk|](|x|)
Expand Down Expand Up @@ -1509,8 +1509,7 @@ If blind V1:
| compute |ev| = |v|-|s|
If blind V2:
| compute |k| =
| compute |s| = |Hs|("commitment_mask" \| |Akout|) % order
| compute |k| = |Hs|("commitment_mask" \| |Akout|) % order
| compute |s| = |Hs|("amount" \| |Akout|)
| compute |v|[0:7] = |ev|[0:7]^|s|[0:7]
Expand Down Expand Up @@ -1730,7 +1729,7 @@ Generate Commitment Mask

**Description**

| compute |s| = |Hs|("amount" \| |AKout|)
| compute |s| = |Hs|("commitment_mask" \| |AKout|)
Return |s|

Expand Down Expand Up @@ -1842,11 +1841,11 @@ Generate TX output keys

**Description**

.. |nak| replace:: :math:`\mathit{need_additional_key}`
.. |ak| replace:: :math:`\mathit{additional_key}`
.. |nak| replace:: :math:`\mathit{need\_additional\_key}`
.. |ak| replace:: :math:`\mathit{additional\_key}`
.. |txsec| replace:: :math:`\mathit{tx_{sec}}`
.. |sub| replace:: :math:`\mathit{is_subaddress}`
.. |chgaddr| replace:: :math:`\mathit{is_change_address}`
.. |sub| replace:: :math:`\mathit{is\_subaddress}`
.. |chgaddr| replace:: :math:`\mathit{is\_change\_address}`

Compute addtional key |P| if needed, amount key blinding and ephemeral destination key.

Expand Down Expand Up @@ -2168,14 +2167,14 @@ Generate the matrix ring parameters:
| check the order of |Hi|
| compute |aHi|
| compute |eai| = |enc|[|spk|](|ai|)
| if not option clear xin:
| if not option\_clear\_xin:
| compute |xin| = |dec|[|spk|](|exin|)
| compute |IIi| = |xin|.|Hi|
|
|
|
return |eai| , |aGi| [ |aHi|, |IIi|]
return |eai| , |aGi| [|aHi|, |IIi|]


**Command**
Expand Down Expand Up @@ -2416,7 +2415,7 @@ Helper functions
|
| :math:`data` = :math:`point2bytes(P)`
| |s| = |H|(:math:`data`) % order
| :math:`Q` = :math:`ge_from_fe(s)`
| :math:`Q` = :math:`ge\_from\_fe(s)`

**DeriveAES**
Expand Down
1 change: 0 additions & 1 deletion doc/ref.txt

This file was deleted.

170 changes: 0 additions & 170 deletions script.ld

This file was deleted.

9 changes: 6 additions & 3 deletions src/monero_init.c
Expand Up @@ -163,15 +163,18 @@ int monero_apdu_reset() {
unsigned int client_version_len;
char client_version[16];
client_version_len = G_monero_vstate.io_length - G_monero_vstate.io_offset;
if (client_version_len > 15) {
if (client_version_len > 14) {
THROW(SW_CLIENT_NOT_SUPPORTED+1);
}
monero_io_fetch((unsigned char*)&client_version[0], client_version_len);
client_version[client_version_len] = '.';
client_version_len++;
client_version[client_version_len] = 0;
unsigned int i = 0;
while(i < MONERO_SUPPORTED_CLIENT_SIZE) {
if ((strlen((char*)PIC(monero_supported_client[i])) == client_version_len) &&
(os_memcmp((char*)PIC(monero_supported_client[i]), client_version, client_version_len)==0) ) {
unsigned int monero_supported_client_len = strlen((char*)PIC(monero_supported_client[i]));
if ((monero_supported_client_len <= client_version_len) &&
(os_memcmp((char*)PIC(monero_supported_client[i]), client_version, monero_supported_client_len)==0) ) {
break;
}
i++;
Expand Down

0 comments on commit 6eb2123

Please sign in to comment.