It's important to remind everyone: Your nsec is temporary and it should be treated like so. Nostr is not about a single nsec for life. We are not making soul-bound tokens. You should have many nsecs. Your main nsec will leak before your kids get a chance to fight over it. So, only keep funds and information that you are willing to loose.

Replies (68)

JackTheMimic's avatar
JackTheMimic 2 weeks ago
How do I know this is Vitor or some imposter who got his leaked Nsec? I guess I can't. Vitor would never say something like this.
I don't back up my nsecs for when I lose devices or suspect something is up. I like to just burn the keys.
JackTheMimic's avatar
JackTheMimic 2 weeks ago
So you don't see that this is not a useful protocol in that context? A public key identity base speech. This is like saying "PGP keys can leak therefore don't take your security THAT seriously." This is wildly irresponsible.
This is one thing I wish for nostr: the ability to change your private key yet keep everything else (posts, followers, etc.). I don't know if it's technically even possible, but I also use Hive (hive [dot] io) and it's very possible and easy there.
JR's avatar
JR 2 weeks ago
Amazing comment πŸ‘ŒπŸΌ
JackTheMimic's avatar
JackTheMimic 2 weeks ago
So, take what you just said and apply it to your original post and make it make sense. Without concluding "I can't take security that seriously so why try?" Again, that make the protocol you've spent years on, useless. And it's generally a irresponsible position to take.
It's not useless. It's just not the hardcore crypto security you would usually see. Our apps REQUIRE a hot key loaded in memory at all times. There is no way to do cold wallets. We are literally always in the line of fire. We can't protect anyone against compromised systems and most phones are compromised. I You agree that you will never have security if keys are placed on a network connected device. Then, all we can do is to minimize the damage and let people play while they can.
Primate's avatar
Primate 2 weeks ago
Your deduction doesn’t follow: if something happens to be temporary (and someone reminds you of this) does not mean that something is useless or even unsafe, security always being relative to convenience whether in time or surface area of another sort.
Matthias's avatar
Matthias 2 weeks ago
Is there a standard that lets you to maintain one identity/profile using multiple names? More resistant to impersonation attacks. Like if someone created a new profile that's an exact copy of yours, and said "I'm the new Vitor Pamplona!"
puzzles 's avatar
puzzles 2 weeks ago
Spitting super hot fire πŸ”₯ today
Primate's avatar
Primate 2 weeks ago
Maybe vitor means unstable long term or unsustainable in a reliably ownable way. Over my head tho.
JackTheMimic's avatar
JackTheMimic 2 weeks ago
HSM key signer is entirely possible. Massively reduces risk down to physical access. But fair enough if sessions can't be batched and signed PSBT style then yes, there's a compromise risk.
Ironically you can argue in the long run NIP-05 is a better guarantor of authenticity then the nsec. Someone can steal the nsec but they can't make make me or you point our websites to the wrong nsec, unless they compromise our whole lives.
secure namecoin key pointing to your latest npub seems pretty good
that's why there should be an optional, stable identity key that can be easily linked and possibly disavowed. which i proposed over a year ago in nip-102
That's a fair point. Though I think when you get to the point where the feds are spoofing your DNS it's a different scale of threat with different concerns. Especially in a scenario where people are already doubting that you control your nsec. It would very cool though if NIP-05 supported decentralized protocols as well.
It's not, you can rotate your nsec in Nostr, start fresh. imagine having to load all your DMs from 50 years of DMs just to use nostr? It doesn't make sense. A full reset every once in a while is healthy for you and the protocol.
It doesn’t have to be that way forever, nostr can and should adopt some kind of PKI infrastructure, @inkan did a thing in this regard
inkan's avatar inkan
A short explainer of the Inkan identity system. β–Œ What is Inkan? Inkan enables online identities whose private key can be created in cold storage and stay there permanently. The key never has to touch an internet-connected device and does not have to be kept close at hand. The identity itself can nonetheless be used easily for everyday online authentication, like posting, replying, messaging, or signing in to services. β–Œ How does it work? Inkan builds on the Nostr protocol which facilitates the distribution of digitally signed content. The idea behind Inkan is that the identity-securing key never has to sign that content itself. It can delegate signing authority to delegatee keys, which handle the everyday signing on its behalf. If a delegatee key is ever lost or stolen, it can be replaced. β–Œ Delegations between keys Delegations are time-indexed two-place relations. Between any two key pairs, at any moment in time, the first key pair either delegates signing authority to the second or it doesn't. When it does, the second key is authorized to sign on the first's behalf. When it doesn't, the second key has no such authority. Delegations are either direct or indirect. A direct delegation arises when one key has expressly declared that it delegates signing authority to another. An indirect delegation arises because, on Inkan's concept of delegation, the relation is transitively closed: if X delegates to Y and Y delegates to Z, then X also indirectly delegates to Z. β–Œ How is a direct delegation created? A direct delegation from key pair X to key pair Y is created when both key pairs digitally sign a "Declaration of Delegation of Signing Authority" by which X declares that it delegates signing authority to Y, and Y declares that it accepts. The signed declaration must then be recorded on-chain (Inkan uses Ethereum). The delegation begins at the time of the block in which the declaration was recorded, and remains in effect until it is revoked. One special case: the above holds only if neither X nor Y has previously permanently invalidated itself. If either has, no delegation relationship is created, even though the declaration sits on-chain. (See "What is permanent key invalidation?" below.) As part of the delegation declaration, X and Y also specify whether X can revoke the delegation unilaterally, or whether Y's consent is required. The default is unilateral revocation by X. This matters most if Y's private key is ever lost: with unilateral revocation, the user can still revoke using X alone; if Y's consent is required, they cannot (since they no longer have access to Y, and thus can no longer use Y to sign the revocation declaration). For most users, unilateral revocation is recommended for this reason. β–Œ How is a direct delegation terminated? A direct delegation from key pair X to key pair Y is terminated when X digitally signs a "Declaration of Revocation of Signing Authority," by which it revokes the signing authority it had delegated to Y. If the original delegation declaration specified that Y's consent is required for revocation, Y must also sign; otherwise, X's signature alone is enough. The signed revocation declaration must then be recorded on-chain. If it carries all required signatures, the delegation relationship terminates at the time of the block in which the declaration was recorded. One final wrinkle: when a delegation declaration and a revocation declaration between the same X and Y land in the same Ethereum block, the revocation is by convention treated as occurring first, and the delegation as occurring thereafter. So from that block on, the delegation is in effect (assuming neither X nor Y has been permanently invalidated). The convention is just a tiebreaker for cases that block timestamps can't order. β–Œ What is permanent key invalidation? The third type of declaration in Inkan is the "Declaration of Permanent Invalidation of a Key Pair." It is signed by the key pair invalidating itself, declaring that, from then on, this key pair can no longer participate in any direct delegation relationship, either as delegator or as delegatee. Once signed, the invalidation declaration must be recorded on-chain. It takes effect at the time of the block in which it was recorded. From that point on, all existing direct delegations in which the invalidated key pair was delegator or delegatee are terminated, and no new direct delegations involving it can come into existence, even if a delegation declaration naming it is later recorded on-chain. The main use is invalidating a compromised master key. Such a key has no delegator, so ordinary revocation isn't available. Permanent invalidation lets the user withdraw it from the Inkan ecosystem entirely. β–Œ Delegation timelines An Inkan-enabled client can read the three types of declarations on the blockchain and, for any given pubkey and any past moment up to the present, compute the direct delegation relationships that the pubkey was involved in at that moment. The indirect ones follow by transitive closure. So for any pubkey, the client can compile a complete timeline showing every direct and indirect delegation relationship that pubkey has been involved in at any time, up to the present moment. At www.inkan.cc, registered users can view such timelines for any pubkey that has been involved in delegations and trace them back to the underlying declarations recorded on-chain. β–Œ Bitcoin timestamping of Nostr events Inkan needs an objective, auditable rule for when the act of signing each Nostr event is deemed to have occurred. To achieve this, Inkan uses OpenTimestamps (OTS) to anchor Nostr events to Bitcoin blocks. An OTS proof for an event establishes that the event and the cryptographic artifact that constitutes its "signature" existed by the time of a specific Bitcoin block. Inkan then treats an event's 'created_at' field (the signer's self-declared timestamp) as its objective signing time if an OTS proof shows the event and its signature existed shortly after that time. The "shortly after" window is user-configurable (default: four hours). Events without such a proof are treated as if they had no valid digital signature at all, are not displayed by the client, and are not attributed to any delegator. β–Œ Attribution of Nostr events Under this framework, we know, for any past time T and any two keys X and Y, whether X delegated (directly or indirectly) signing authority to Y at T. And for any event that Y has signed, with both a valid cryptographic signature and a valid OTS anchor, we have an objective signing time, i.e. the event's 'created_at'. Putting this together gives us the necessary ingredients for a well-defined attribution rule: an event E is attributed to key X if and only if some key Y validly signed E at time T and, as of T, X delegated signing authority to Y. So, for example, a text note signed by a delegatee Y during a valid delegation period from X appears on X's timeline and is displayed there under X's profile as if posted by X, even though X's own key never signed it. β–Œ Setting up and managing an Inkan identity Inkan provides a tool, the "Inkan Management Utility," that automates the creation of the key pairs and the delegations running through them that constitute an identity. The utility can also create key replacements and permanent invalidations. The utility runs without network access and is intended to be used on an amnesic, air-gapped system such as Tails (with networking disabled), so that nothing persists after shutdown and the master key is never exposed to a networked host. The utility is available as a Linux AppImage: https://www.inkan.cc/settings/inkan-management-utility Users should set up their identity by building a chain of delegations (master β†’ intermediate(s) β†’ signer) rather than a single master-to-signer delegation. By transitive closure, events signed by the bottom-of-chain signer are attributed to the master. Revocations only require the immediate delegator above the affected signer, so it is not necessary to keep private keys above that immediate delegator close at hand. In particular, the master, once it has signed the chain's initial top-level delegation during the identity's creation ceremony, can stay in cold storage indefinitely. Generated key pairs can be backed up in encrypted form on USB sticks; multiple copies in separate locations are easy and recommended. Only the current signer key and the delegator immediately above that signer need to be reachable. The rest can be stored in relatively inaccessible locations. The Ethereum gas fees required for on-chain recording of delegation, revocation and invalidation declarations can be paid by the user directly or by a sponsor. Sponsored payment lets a user create and manage an Inkan identity without holding ETH, and without revealing any private key information to the sponsor. Setting up an Inkan identity takes some up-front ceremony, but ongoing use does not. The initial work is to create key pairs, sign the declarations that wire the keys into delegation relationships, and record these declarations on-chain. This is a one-time effort and is in large part automated through the management utility. After that, most of the keys can be put away and not be touched again, with only the signing key sitting "hot" on internet-connected devices for everyday signing, and the immediate delegator of the signing key kept close at hand so that it can perform key rotations if the signer is lost or compromised, or preemptively on a periodic basis. β–Œ Using the client β€” two profiles, one identity When using the Inkan client, you log in with your signer key and sign events with it, just as you would with any other Nostr client. These events appear on the signer's profile page (as in any other client), but in addition they also appear on the profile pages of each of its delegators, including, especially, your top-level identity. You can set the signer's profile (avatar, banner, display name, etc.) by publishing a kind-0 event as usual. In addition, Inkan includes a mechanism by which the signer can set profiles for its current delegators. This allows your top-level identity to maintain a profile without having to sign any Nostr event itself. Your identity's profile is what you present yourself with to the world. Others should follow and interact with the identity, not with the signer beneath it. The signer is ephemeral and expected to be replaced sooner or later. The identity is expected to be permanent and is the appropriate object to which followers should attach.
View quoted note →
Nostr DMs aren't useful because they don't work dependably. Spending years to build an audience and business, only to have it stolen because your client is insecure, is a massive denotivator. I'll need to reassess whether Amethyst or Nostr is worth my time.
DMs have been quite useful for the last 2 years or so to me. It works quite well everywhere these days. And now with MLS, it gets even better. Use Amber if you are concerned with security. Never put your keys on any client, regardless of how well the dev is trying to make you feel good about it. We are all using way too many dependencies to be able to review security in apps. That's why signers are better: they are tiny. It's easy to review. There is no dev on Nostr right now that is specialized in security. Nobody has ever paid for it. So, keep that in mind as well.
frphank's avatar
frphank 2 weeks ago
Ah yes? Hm can't keep track on who's on what side for key rotation apparently.
weev's avatar
weev 2 weeks ago
There needs to be some sort of sane way to expire a Nostr key that lets you keep your follower graph. I don’t care about the posts, but I would like to be able to gracefully expire my key after rotating it in a way that is not dependent on an external domain name. Some way for me to sign a statement that says β€œI’m over at this npub now” and have everyone following me follow it seamlessly.
No, but none of my sponsors or donors are specifically asking for security upgrades. Same for all the other clients. We do it because we care, but that doesn't mean it's any good. Also, security is much more expensive than what anyone is getting paid to do as a nostr dev.
You're changing topics to sidestep the issue. Since you're being paid to know best how to develop Amethyst, but your rational is that no one is being paid to increase Amethyst security, is the lack of security really a lack of funding, or a lack of prioritization?
It's lack of knowledge. We just don't have anyone in Nostr that is a true security dev. But again, our solution is to use signers... ALWAYS. That minimizes your exposure. I don't know if clients will ever get to the security model that a signer can get.
Thank you for your honest answer and bringing this security issue to my attention, and it makes sense. I didn't realize my private key was so vulnerable. Now I can take steps, because the idea of having my nsec compromised is demoralizing.
amethyst has nip-05 .bit resolution. get a .bit and update the nostr value when you need to rotate a key. search testls.bit or m@testls.bit in amethyst. I think resolving these @'s in amethyst also makes sense but vitor strongly disagrees πŸ˜‚
"There is no way to do cold wallets." I've been running test identities out of a cold wallet since last November. The infrastructure around it is still fairly fragile, but it's just a run-of-the-mill software engineering problem at this point (I'm not a software engineer, so it's taking me a bit longer).
Thanks for realizing that this can work. By the way, if you'd like to try it out, you can create a test identity with the management utility (see below). You can say hello to the other three test identities and talk about the weather. You can also wait until a less fragile version of it is available. I just realized something that should allow me to make it pretty performant soon.
inkan's avatar inkan
For anyone curious to try the Inkan prototype, here's roughly what's involved in setting up an identity: 1. Get the Inkan Management Utility (a Linux AppImage): https://www.inkan.cc/settings/inkan-management-utility 2. Run it on a current Linux system. I've tested it on Ubuntu 24.04 and Tails 7.7.2. Ideally the utility should be run on an airgapped system (I like to use Tails with networking disabled as a proxy for an airgapped machine). Once you open the utility, I suggest using the "Quick identity setup" path for your first identity; it's the most straightforward. 3. The utility will produce the chain of key pairs that make up your identity, a master at the top, one or more intermediates, and a signer at the bottom. Keep the master and intermediate keys safely offline (encrypted on a USB stick or two is fine). The signer keypair you can move to your regular online machine, since that's the key you'll use day-to-day. Once you have the signer's pubkey, send it over to me on Nostr (@inkan) or to contact@inkan.cc so I can allowlist it at www.inkan.cc. Once you've been allowlisted, go on to step 4. 4. The utility also creates an Ethereum transaction that registers your identity on-chain. The easiest way to get it broadcast is via a sponsor. They cover the gas and broadcast it for you, so you don't need to hold any ETH yourself. Alternatively, you can sign and pay for it within the utility, then broadcast the signed transaction yourself. 5. Once the transaction has confirmed on Ethereum and your signer pubkey is allowlisted at www.inkan.cc, you're ready to log in. Go to www.inkan.cc, log in with NIP-07 using your signer key, and complete the setup wizard. Reach out at any step if you get stuck or have questions, happy to help. Also, if ETH or finding a sponsor is what's keeping you from trying Inkan, let me know. I'd like to get a sense of how much of a hurdle this is. View quoted note β†’
View quoted note →
Yes, I've been thinking about making in-browser construction of identities available as an option. There is nothing difficult about it in principle, but it sort of defeats the purpose of keeping the identity-securing keys airgapped. I may still decide to do so as a sort of toy-identity option so it becomes very easy to try it out. I first want to fortify the surrounding infrastructure, so it's more scaleable before I roll out an-easy-to-try option.
What a faggy response to reasonable arguments. Nip55 makes security possible for nsecs, so they're not necessarily disposable. And yes, I haven't had Twitter since before nostr was even created so yeah, no one would see that. Finding a a nostr note is the obvious response to my request, since we're on nostr talking about nostr.
↑