Skip to main content
moved info from comments to the question
Source Link
Adam Katz
  • 12.1k
  • 2
  • 27
  • 50

I'm writing a mailing list manager program. For subscribing and unsubscribing, I'm considering using HMACs of email addresses with secret keys to generate unsubscribe links. This key would be generated randomly one time on the server and then used for all links from that time on. Links would have this format:

https://list.example.com/unsubscribe?address={email_address}&token={hmac(email_address, secret_key)}

When someone subscribes through my web form, my server will send an email with one of these links. When they click the link to confirm their subscription, I need to verify that my server actually sent it.

I'm writing a mailing list manager program. For unsubscribing, I'm considering using HMACs of email addresses with secret keys to generate unsubscribe links. This key would be generated randomly one time on the server and then used for all links from that time on. Links would have this format:

https://list.example.com/unsubscribe?address={email_address}&token={hmac(email_address, secret_key)}

I'm writing a mailing list manager program. For subscribing and unsubscribing, I'm considering using HMACs of email addresses with secret keys to generate unsubscribe links. This key would be generated one time on the server and then used for all links from that time on. Links would have this format:

https://list.example.com/unsubscribe?address={email_address}&token={hmac(email_address, secret_key)}

When someone subscribes through my web form, my server will send an email with one of these links. When they click the link to confirm their subscription, I need to verify that my server actually sent it.

Source Link
Someone
  • 179
  • 7

Is an HMAC of an email address with a permanent secret key a good way to generate security tokens for unsubscribing from an email list?

I'm writing a mailing list manager program. For unsubscribing, I'm considering using HMACs of email addresses with secret keys to generate unsubscribe links. This key would be generated randomly one time on the server and then used for all links from that time on. Links would have this format:

https://list.example.com/unsubscribe?address={email_address}&token={hmac(email_address, secret_key)}