Skip to content

Tokens are near impossible to type by a human #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Simon-Laux opened this issue Dec 6, 2023 · 4 comments
Open

Tokens are near impossible to type by a human #11

Simon-Laux opened this issue Dec 6, 2023 · 4 comments

Comments

@Simon-Laux
Copy link

I tried it and I failed.

Ideas that could help:

  • inserting spaces or hyphens
  • use base64 instead of base32
  • some sort of compression (not zip, because zip needs a large dictionary)
@rklaehn
Copy link
Contributor

rklaehn commented Dec 7, 2023

They are not meant to be typed as a human. They contain a 32 byte node id that is random and can not be compressed. No matter what dictionary you use, this will be a pain to type.

Not sure what can be done about this tbh. Use DNS or a similar mechanism to assign a name to a node id, with all the downsides this has? Definitely not something we would require by default for this tool.

@Simon-Laux
Copy link
Author

Simon-Laux commented Dec 7, 2023

Splitting it into chunks separated by characters that are outside of the base32 would already help readability greatly, because then it become easier to check for errors:

dumbpipe connect nodeedijgsumxv3p3jtthg2j7y4y7unfsw2teeju2qkyvrwpgh3nrmpgaaicaqambkfsgsh4caya3hxntn4pyebqciadadea6ayyaaclvt4qdpphfn4qyebqciadadea6ayyabccehucpvyt4xuqyebq
# vs
dumbpipe connect nodeedijgsum.xv3p3jtthg2j.7y4y7unfsw2t.eeju2qkyvrwp.gh3nrmpgaaic.aqambkfsgsh4.caya3hxntn4p.yebqciadadea.6ayyaaclvt4q.dpphfn4qyebq.ciadadea6ayy.abccehucpvyt.4xuqyebq

some examples:

chunks of 12 chars:
nodeedijgsum_xv3p3jtthg2j_7y4y7unfsw2t_eeju2qkyvrwp_gh3nrmpgaaic_aqambkfsgsh4_caya3hxntn4p_yebqciadadea_6ayyaaclvt4q_dpphfn4qyebq_ciadadea6ayy_abccehucpvyt_4xuqyebq
chunks of 5 chars:
nodee_dijgs_umxv3_p3jtt_hg2j7_y4y7u_nfsw2_teeju_2qkyv_rwpgh_3nrmp_gaaic_aqamb_kfsgs_h4cay_a3hxn_tn4py_ebqci_adade_a6ayy_aaclv_t4qdp_phfn4_qyebq_ciada_dea6a_yyabc_cehuc_pvyt4_xuqye_bq
chunks of 8 chars:
nodeedij_gsumxv3p_3jtthg2j_7y4y7unf_sw2teeju_2qkyvrwp_gh3nrmpg_aaicaqam_bkfsgsh4_caya3hxn_tn4pyebq_ciadadea_6ayyaacl_vt4qdpph_fn4qyebq_ciadadea_6ayyabcc_ehucpvyt_4xuqyebq

I think _ is the best character for this, because double click still selects the whole string, but - would be better for subdomains, though I can't think of a use case where tokens are put into a subdomain 🤷 (anyways this would be only cosmetic anyway, just to help humans to type it)

@rklaehn
Copy link
Contributor

rklaehn commented Dec 12, 2023

We can make any non base32 char a separator that just gets stripped out during parsing. So _ would work.

Tickets can't be a subdomain because they are too long. A subdomain is limited to 64 chars, and a ticket that contains direct addresses will be more than that.

@taotien
Copy link

taotien commented Jun 29, 2024

I think a good option for desktop users would be to automatically put the token or command into the clipboard. I dunno if sending the string to stdout would work, but that would be another option such that the user can then pipe into wl-copy or save to a file.

@n0bot n0bot bot added this to iroh Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants