Code Monkey home page Code Monkey logo

bangleapps's People

Contributors

adamschmalhofer avatar alainsaas avatar alessandrococco avatar andrewgoz avatar berkenbu avatar chiefdaft avatar dddanny avatar elykittytee avatar frigis1 avatar gfwilliams avatar halemmerich avatar hilmarst avatar hopkira avatar jabituyaben avatar myxor avatar nujw avatar nxdefiant avatar omegarogue avatar peerdavid avatar pidajo avatar rigrig avatar ronin0000 avatar rozek avatar sir-indy avatar stiralbios avatar storm64 avatar t0m1o1 avatar thyttan avatar wagnerf42 avatar xxduxx avatar

Watchers

 avatar

bangleapps's Issues

b32decode() of some secrets adds a trailing 0

Secret is : 0x11, 0x11, 0x11, x11 (real one is 64 bytes, found this one to reproduce the problem)
Encoded in base32 : CEIRCEI (without the trailing =)

b32decode("CEIRCEI");
returns :
Uint8Array(5) [ 17, 17, 17, 17, 0 ]

SHA1 won't be the same and in turn returned code won't work.

2FA Authenticator (v0.04) gets stuck on loading... even with default apps

I'm a new user of Bangle.js but I've not been able to get the 2FA Authenticator app to install on my device.

It's just giving me "Loading..." - as per this photo:
image

That's after I've followed the instructions in "About -> Install default apps" and even removed as many of the apps as I could find - as per the other open post that mentioned crypto.js ...

There's odd stuff going on with the IDE as well ...
image

I'm a bit clueless now.. can you help? Most other things seem to work. I have no idea what I'm doing... thanks in advance.

Uncaught Error: Module crypto not found

Just launching the app on firmware 2v11, I get this:

 ____                 _
|  __|___ ___ ___ _ _|_|___ ___
|  __|_ -| . |  _| | | |   | . |
|____|___|  _|_| |___|_|_|_|___|
         |_| espruino.com
 2v11 (c) 2021 G.Williams
Uncaught Error: Module crypto not found
 at line 2 col 25 in authentiwatch.app.js
const crypto=require("crypto");

Anything I could do to fix this?

Support otpauth-migration

Sample QR code data:

Original tokens:

test
abcd i234 efgh 567o ->base-32-> [00 44 34 6b 7c 21 4c 7e fb ee]

test2
ijkl o765 mnop 432i ->base-32-> [42 54 b7 7f dd 63 5c fe 6f 48]

Exported as:

otpauth-migration://offline?data=ChgKCgBENGt8IUx%2B%2B%2B4SBHRlc3QgASgBMAIKGQoKQlS3f91jXP5vSBIFdGVzdDIgASgBMAIQARgBIAAo%2FamA3gE%3D

URL-decoded:

otpauth-migration://offline?data=ChgKCgBENGt8IUx+++4SBHRlc3QgASgBMAIKGQoKQlS3f91jXP5vSBIFdGVzdDIgASgBMAIQARgBIAAo/amA3gE=

"data" base-64 decodes as:

0000: 0a 18 0a 0a 00 44 34 6b 7c 21 4c 7e fb ee 12 04
0010: 74 65 73 74 20 01 28 01 30 02 0a 19 0a 0a 42 54
0020: b7 7f dd 63 5c fe 6f 48 12 05 74 65 73 74 32 20
0030: 01 28 01 30 02 10 01 18 01 20 00 28 fd a9 80 de
0040: 01

Using information from the following sites:

Decodes as:

0a, varint 0001 010 : field_number=0001=1(OtpParameters), wire_type=010=length delimited
18, varint 0011000=24 bytes
    [0a 0a 00 44 34 6b 7c 21 4c 7e fb ee 12 04 74 65 73 74 20 01 28 01 30 02]
     0a, varint 0001 010 : field_number=0001=1(secret), wire_type=010=length delimited
     0a, varint 0001 010=10 bytes
         [00 44 34 6b 7c 21 4c 7e fb ee]
     12, varint 0010 010 : field_number=0010=2(name), wire_type=010=length delimited
     04, varint 0000100=4 bytes
         [74 65 73 74] ("test")
NOTE: field_number=3 (issuer, same type as name) is not present
     20, varint 0100 000 : field_number=0100=4(algorithm), wire_type=000=varint
         [01] (1=SHA1 (2=SHA256, 3=SHA512))
     28, varint 0101 000 : field_number=0101=5(#digits), wire_type=000=varint
         [01] (1=6 digits (2=8 digits))
     30, varint 0110 000 : field_number=0110=6(type), wire_type=000=varint
         [02] (2=TOTP (1=HOTP))
NOTE: field_number=7 (counter, int64) is not present

0a, varint 0001 010 : field_number=0001=1(OtpParameters), wire_type=010=length delimited
19, varint 0001011=25 bytes
    [0a 0a 42 54 b7 7f dd 63 5c fe 6f 48 12 05 74 65 73 74 32 20 01 28 01 30 02]
     0a, varint 0001 010 : field_number=0001=1, wire_type=010=length delimited
     0a, varint 0001010=10 bytes
         [42 54 b7 7f dd 63 5c fe 6f 48]
     12, varint 0010 010 : field_number=0010=2, wire_type=010=length delimited
     05, varint 0000101=5 bytes
         [74 65 73 74 32] ("test2")
     20, varint 0100 000 : field_number=0100=4, wire_type=000=varint
         [01]
     28, varint 0101 000 : field_number=0101=5, wire_type=000=varint
         [01]
     30, varint 0110 000 : field_number=0110=6, wire_type=000=varint
         [02]

10, varint 0010 000 : field_number=0010=2(version), wire_type=000=varint
    [01]
18, varint 0011 000 : field_number=0011=3(batch_size), wire_type=000=varint
    [01] (did not change when exporting a single token)
20, varint 0100 000 : field_number=0100=4(batch_index), wire_type=000=varint
    [00] (did not change when exporting a single token)
28, varint 0101 000 : field_number=0101=5(batch_id), wire_type=000=varint
    [fd a9 80 de 01]
     fd:                                 1111101
     a9:                         010100 1
     80:                 00000 00
     de:         1011 110
     01: 000 0001
       = 000 00011011 11000000 00010100 11111101
       = 1bc014fd

The batch ID changes if the selected data changes, but if the same data is exported again, the calculated batch ID is the same as before. It isn't random and is dependent on the source data. Is it a checksum?

Use Storage.read/writeJSON

Investigate using Storage.readJSON / Storage.writeJSON to transfer settings between the Bangle and Interface page.

Need faster feedback selecting token

Tapping a token on the watch has a noticeable delay before the code appears. This is due to the time needed to calculate the required hash checksums.

Change the display immediately on the tap before starting the calculation, e.g. to "Working" or some such.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.