npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@aladas-org/cryptocalc

v0.1.1

Published

Crypto Calculator

Downloads

176

Readme

Cryptocalc 0.1.1

  1. Purpose
    Cryptocalc is a standalone desktop application which provides straigthforward conversions between a Private Key (an Hexadecimal value) and the matching Seedphrase . (12 to 24 mnemonics from the BIP39 dictionary). Even though there is already a lot of similar tools online, the purpose is to use these features locally on your computer in order to reduce the risk of having your Private Key or Seedphrase informations stealed.
    NB: Cryptocalc uses ElectronJS as well as many modern and popular Desktop applications

  2. Environment

  3. Installation
    Import locally the Cryptocalc repository

    • 3.1. Open a command line interpreter
      • Use Windows Menu Start then input cmd
      • Change current disk to where you plan to install (eg. if its D then type D:)
      • Change current directory to where you to install (eg. md tools then cd tools)
    • 3.2. Import Cryptocalc from github
      • Open the Cryptocalc repository
      • Use the [ <> Code v ] green button
      • Copy the displayed .git URL
      • In the command line interpreter, type git clone followed by the .git URL
        e.g. git clone https://github.com/ALADAS-org/Cryptocalc.git
      • Type cd Cryptocalc
      • Type npm install
  4. Release notes

    • 4.1. Features in 0.1.0
      • 4.1.1. Complete rewrite of Wallet generation to support BIP39, BIP32 and BIP44 specifications
        I had it mostly wrong (especially the computation of Entropy Checksum). I rewrote Wallet generation in order to make it compatible with these computations: Ian Coleman BIP39 Note that now the Private Key or WIF (only Private Key for Ethereum) are used (see 5.2.2.) to import a wallet in Guarda. The terminology has been changed, the Wallet generation waterfall is now:
        Entropy source => Entropy => Seedphrase => Private Key/WIF => Wallet Address
      • 4.1.2. Support of 12..24 words for the Seedphrase With a variable Entropy Size (128..256 bits), the Seedphrase size varies from 12 to 24 words. The Entropy Size size impacts the Seedphrase and conversely.
      • 4.1.3. Entropy Checksum bits are now displayed (see 6.1.2)
  5. Cryptocalc User Guide
    Double click on _run.bat: this will open the Cryptocalc desktop standalone application

    • 5.1. Features
      • 5.1.1. Generate Entropy from a random Fortune Cookie
        Use [ Generate ] button to draw a random Fortune Cookie (among a compilation of 12803 fortune cookies) which then will be used as the Entropy (with the Salt) to generate a new Seedphrase (between 12 and 24 words) which is derived to get the Private Key from which the Wallet Address is obtained (NB: Private Key and Wallet Address are in the Wallet Tab). There is also a conversion to the Shortened Seedphrase: as only the 4 first characters of each mnemonic are useful (cf. BIP39 specification) then in the Shortened Seedphrase each mnemonic is represented only by its 4 first characters (with the first character in Uppercase as a mean to separate mnemonics).
        NB: As some mnemonics are only 3 characters long, the abbreviation will of course only be whole mnemonic.
        Here is an example below:
        Seedphrase
              goddess also genre east slam borrow amateur pupil merit clinic check zone
              produce bomb deliver submit demise organ cherry race purchase post finish common Shortened Seedphrase
              ProdBombDeliSubmDemiOrgaCherRacePurcPostFiniComm
      • 5.1.2. Several wallets in the same BIP32 HD wallet tree The BIP32 HD wallet tree is determined by the Entropy or Seedphrase. These are 2 isomorphic representations of the SRP (Secret Recovery Passphrase). So you can generate new wallets (Address + Private Key or WIF) by Pasting a previous Entropy or Seedphrase. This will hide the Entropy Source and Salt fields which are meaningless in this situation. You can then change either the Account or Address Index fields in the Wallet tab page. This will show a new [ Refresh ] button to recompute the wallet once you gave finished editing these fields (you can input a decimal value between 0 and 9999). Pushing the [ Refresh ] button (or hitting either [ Return ] or [ Enter ] keys) will recompute the wallet accordingly.
      • 5.1.3. Check the generated wallets against Ian Coleman BIP39: an item in the menu (Help/Resources/Ian Coleman BIP39) eases the checking by opening Ian Coleman BIP39.
      • 5.1.4. Salted Entropy
        The Salting is adding a unique information (e.g. a UUID) so that even if the Entropy Source is the same, the Entropy will be unique at each press of [ Generate ] button.
      • 5.1.5. Choose Entropy Size The Entropy Size is between 128 to 256 bits (32 to 64 hexadecimal digits). This is equivalent a Seedphrase size between 12 to 24 words. Changing Entropy Size impacts the Seedphrase size and conversely.
      • 5.1.6. Display of the Checksum bits (see 5.1.9)
      • 5.1.7. Save Wallet Informations
        With File/Save (or the Save icon in the main toolbar), you can save the Wallet Informations in a timestamped subfolder (eg. 2024_03_07_21h-4m-4s-3_BTC) under _output folder. This subfolder contains wallet_info.txt and a wallet.json with the informations displayed in Seed and Wallet tab pages.
      • 5.1.8. Select Seedphrase Language
        You can select the Language Wordlist (eg. English, French, Deutsh, etc...). Please notice that is not meant to be used with Wallet Manager applications because most will only accept English mnemonics.
        This feature is indeed a mean to add a scramble step in order to make it harder to steal your Secret Recovery Passphrase because it should be translated to English to be used with a Wallet Manager.
        NB: the translation between languages is native in Cryptocalc because the reference is indeed the Word Indexes (see 5.1.9) not the words.
      • 5.1.9. Display of Word Indexes The Word Indexes are between 0 and 2047, it is the index of each of the Seedphrase words in the BIP39 dictionary. You can choose to display these indexes in Decimal or Binary (in Binary you can check that the computed Checksum bits are added at the end of the converted Entropy to determine the index of the last word).
      • 5.1.10. Display of the BIP32 Derivation Path The BIP32 Derivation Path is displayed in the Wallet tab page. You can edit the Account or Address Index fields to generate new wallets which belong to the same BIP32 hierarchy that is determined by the Seedphrase (also called the Secret Recovery Passphrase).
      • 5.1.11. Support of Localization
        In Cryptocalc, the Localization (l10n) feature is the translation of GUI Labels to adapt to the locale. A locale name can be composed of a base language, country (territory) of use, and optionnally a codeset (eg. de_CH.UTF-8). The locale is provided as part of your machine's environment. Cryptocalc only uses the 2 letter language part (eg. en). Localization is enabled by a JSon file in the www/js/L10n folder (eg. gui-msg-en.json) . Currently only en and fr are provided, but I would be nice if contributors could provide other languages (I will of course cite the contributors name in the license) as I preferred to avoid naive use of a translation tool.
    • 5.2. Use cases
      • 5.2.1. Generate a new Wallet and importit in a Wallet manager
        With a Wallet Manager like Guarda you can import a wallet generated by Cryptocalc:
      • 5.2.1.a. Choose a coin (e.g. BTC,ETH,DOGE,LTC,``SOL)
      • 5.2.1.b. Enter WIF or Private Key (No Private Key for ETH wallets)
      • 5.2.3. Store Shortened Seedphrase in a NFC SmartRing
        The entry level SmartRings (price range: 7..15$) contains a NTAG213 NFC with 144 bytes useable capacity. This is enough to store the Shortened Seedphrase, with a 24 words Shortened Seedphrase the maximum required capacity is 96 bytes/characters (24*4, cf. 5.1.1) or even less (as some mnemonics have only three characters).
      • 5.2.4. Store Master password
        This is similar to the previous case, but the Shortened Seedphrase can be used as a Master password for a Password Manager or for tools like PGP Tool which provide encryption/decryption of your documents.
  6. Appendix

    • 6.1. BIP39: a Dictionary of 2048 words
      BIP39 (BIP is the acronym of Bitcoin Improvement Proposal) is a specification regarding:
      • 6.1.1. A Dictionary of 2048 words
        The Dictionary contains 2048 English words each with a their unique 4 starting characters (or 3 if the word is 3 characters long). This dictionary exists also in other languages (e.g. French, Deutsh, Spanish, Italian_, Portuguese, etc...) but Wallet Managers (e.g. Guarda, Metamask, Atomic Wallet, etc...) and Hardware Wallets (eg. Ledger, Trezor, Tangem, etc...) will most probably accept only English words.
      • 6.1.2. Conversion of Seedphrase from and to Entropy The Seedphrase is obtained by drawing words (also called or menemonics) from the dictionary. Drawing a word is indeed choosing an index between 0 and 2047. This index can be represented by 11 bits in Binary (because 2^11 = 2048).
        • Conversion from Entropy to Seedphrase The Entropy is represented in Binary and divided in 11 bits segements but the entropy is a multiple of 8 bits (128, 160, 192, 224, 256) there are "missing bits" for choosing the last word. These "missing bits" are provided by computing the Entropy Checksum. e.g. For an Entropy Size of 128 bits (converted to a 12 words Seedphrase), 132 bits are needed (11 * 12), so the Entropy Checksum provides the missing 4 bits.
        • Conversion from Seedphrase to Entropy For each word its index is retrieved from the Dictionary, its value is represented as a 11 bits segment and a number of bits corresponding to tne Entropy Checksum are removed at the end of the concatenation of 11 bits segments. e.g. For a Seedphrase of 12 words (converted to a 128 bits Entropy), 132 bits are obtained from the Word Indexes (11 * 12), and because the Entropy Checksum is 4 bits long then the 4 bits at the end are removed.
      • Reference
        BIP39 — Mnemonic Generation with detailed explanation
    • 6.2. BIP32: Hierarchic Deterministic wallets BIP32 specifies how to generate wallets with are all derived from the same Entropy or Seedphrase (also called the Secret Recovery Passphrase). A Seedphrase of only 12 words is enough is most Wallet Managers but it is more secure to use a 24 words Seedphrase if possible (e.g. Ledger hardware wallet manager).
      Example: meaning of each part for m/44'/60'/0'/0/0:
      • Start at the master key (m)
      • Follow the BIP44 standard (44′)
      • Derive the key for Ethereum (60′)
      • Access the first account (0′)
      • Choose the external chain, used for public addresses (0)
      • And finally, generate the first address in this sequence (0)