Skip to content

🔑 Using kbpgp to verify messages based on a public key

License

Notifications You must be signed in to change notification settings

0xjjpa/keybase-verify

Repository files navigation

keybase-verifyBuild Status

js-standard-style

🔑 Using kbpgp to verify messages based on a public key

Install

$ npm install keybase-verify --save

Usage

constverify=require('keybase-verify')

constpublicKey=`-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Keybase OpenPGP v2.0.56
Comment: https://keybase.io/jjperezaguinaga

xsFNBFfglq0BEADTvFWRPl18pcBKQmQH8WaiGQ+JXZScuv1PXAcereGrObZbQ4oN
...
`

constsignedMessage=`-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

This is a sample message signed by @jjperezaguinaga
-----BEGIN PGP SIGNATURE-----
Version: Keybase OpenPGP v2.0.58
Comment: https://keybase.io/crypto

wsBcBAABCgAGBQJYOMpcAAoJEEcNV2F2U20cE4gH/jhCSVZ3LUh6fnn9eZjkQi1t
...
`

try{
verify(publicKey,signedMessage).then(()=>{
console.log('The user signed the message')
})
}catch(err){
console.log('The user didn‘t sign the message',err)
}

Related

E.nigma- 🔐 e.nigma.pw / Encryption toolbox utility

License

MIT ©Jose Aguinaga

About

🔑 Using kbpgp to verify messages based on a public key

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published