Seth
Seth

Reputation: 471

Encrypt phone numbers node (no need to decrypt)

I am building an app that collects non-personal information about customers when they text my service through Twilio. Unfortunately, the only good way I see to keep track of people is to use their phone number as an id. My plan to maintain privacy/security is to encrypt the phone numbers.

I plan to store customer phone numbers in an Amazon S3 instance that has been compromised before: all the more reason to keep them encrypted.

In fact, I would like to NEVER allow myself to decrypt them again. I am using node in this case to do the work. All that I need is that the hash property (encrypting the same phone number gives the same output) is preserved.

What is the best way to encrypt, without giving myself the option to decrypt?

Upvotes: 0

Views: 1387

Answers (1)

Thomas
Thomas

Reputation: 1401

You wouldn't encrypt it, you'd hash it. Look into something like SHA-256.

It's recommended you add a salt. This is a random value appended to prevent brute forcing.

Upvotes: 1

Related Questions