andrewgoz / bangleapps Goto Github PK
View Code? Open in Web Editor NEWThis project forked from espruino/bangleapps
Bangle.js App Loader (and Apps)
Home Page: https://banglejs.com
License: MIT License
This project forked from espruino/bangleapps
Bangle.js App Loader (and Apps)
Home Page: https://banglejs.com
License: MIT License
You could split the token into blocks to make it more readable.
I have built it in for testing at hotp.
https://github.com/BartS23/BangleApps/blob/RHA/apps/authentiwatch/app.js#L96-L110
What do you think about it?
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.
Limit label text auto-generated from scanned account and issuer data to 10 characters.
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:
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 ...
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.
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?
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?
Change settings structure to support more items than just the tokens.
Investigate using Storage.readJSON / Storage.writeJSON to transfer settings between the Bangle and Interface page.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.