The way I want to login is – by remembering my passwords, that are easy. Cryptic passwords are out of memory bounds, so alternatively, we can take an easy password or phrase, and then applying a simple process to complicate it.
Since nostr requires your secret key nsec to login, which is a long hex number, we can produce this long Hex No by doing a SHA256 on a long but simple phrase that you can remember/retrieve easily.
Then for security and ease of use, i can sign in with a Signer like NOS2x on my desktop browser, and Amber bunker on my android mobile.
Here’s an Example
Step 1. Choose a phrase like – ‘ Humpty Dumpty sat on a wall ‘
Step 2. SHA-256 it ( see the process below ) . This now outputs a long Hex number:
1b9ed7aa6346ee2c6e0faf0f75997b9308916160239b1844e7a77bee183f355d .
A point here. Although there are quite a number of online SHA256 generators, I prefer using the method, as below, in offline mode locally.
Step 3. Just put this in your Nos2x signer to create the NSec, or Nostr Secret Key . This Nos2x Signer is available in the chrome webstore, as well as on github at https://github.com/fiatjaf/nos2x
And you can use this for your identity for Humpty Dumpty on any app on Nostr. Happy Nostr-ing!
How to sha256?
In a command line, run the command:
For Windows:
certutil -hashfile [file location] SHA256. For example: certutil -hashfile C:\Users\user1\Documents\myseedphrase.txt SHA256
For Linux:
sha256sum [file location]. For example: sha256sum ~/Documents\myseedphrase.txt
For Mac OS:
shasum -a 256 [file location]. For example: shasum -a 256 ~/Documents\myseedphrase.txt