import * as pgp from 'openpgp'; import { Key } from 'openpgp'; import { BitGoBase } from '../bitgoBase'; /** * Fetches BitGo's pubic gpg key used in MPC flows * @param {BitGo} bitgo BitGo object * @return {Key} public gpg key */ export declare function getBitgoGpgPubKey(bitgo: BitGoBase): Promise; /** * Verify an Eddsa KeyShare Proof. * * @param senderPubKey public key of the sender of the privateShareProof * @param privateShareProof u value proof * @param uValue u value from an Eddsa keyshare * @return {boolean} whether uValue proof actually was signed by sender as part of their subkeys */ export declare function verifyEdShareProof(senderPubKey: string, privateShareProof: string, uValue: string): Promise; /** * Verify a shared data proof. * * @param senderPubKeyArm public key of the signer of the key with proof data * @param keyWithNotation signed reciever key with notation data * @param dataToVerify data to be checked against notation data in the signed key * @return {boolean} whether proof is valid */ export declare function verifySharedDataProof(senderPubKeyArm: string, keyWithNotation: string, dataToVerify: { name: string; value: string; }[]): Promise; /** * Creates a proof through adding notation data to a GPG ceritifying signature. * * @param privateKeyArmored gpg private key in armor format of the sender * @param publicKeyToCertArmored gpg public key in armor fomrat of the reciever * @param notations data to be proofed * @return {string} keyshare proof */ export declare function createSharedDataProof(privateKeyArmored: string, publicKeyToCertArmored: string, notations: { name: string; value: string; }[]): Promise; /** * Creates an Eddsa KeyShare Proof by appending an ed25519 subkey to an armored gpg private key. * * @param privateArmor gpg private key in armor format * @param uValue u value from an Eddsa keyshare * @return {string} keyshare proof */ export declare function createShareProof(privateArmor: string, uValue: string): Promise; /** * Encrypts string using gpg key * @DEPRECATED - should use encryptAndSignText instead for added security * * @param text string to encrypt * @param key encryption key * @return {string} encrypted string * * TODO(BG-47170): Delete once gpg signatures are fully supported */ export declare function encryptText(text: string, key: Key): Promise; /** * Encrypts and signs a string * @param text string to encrypt and sign * @param publicArmor public key to encrypt with * @param privateArmor private key to sign with */ export declare function encryptAndSignText(text: string, publicArmor: string, privateArmor: string): Promise; /** * Reads a signed and encrypted message * * @param signed signed and encrypted message * @param publicArmor public key to verify signature * @param privateArmor private key to decrypt message */ export declare function readSignedMessage(signed: string, publicArmor: string, privateArmor: string): Promise; /** * Generates a signature * * @param text string to generate a signature for * @param privateArmor private key as armored string * @return {string} armored signature string */ export declare function signText(text: string, privateArmor: string): Promise; /** * Verifies signature was generated by the public key and matches the expected text * * @param text text that the signature was for * @param armoredSignature signed message as an armored string * @param publicArmor public key that generated the signature */ export declare function verifySignature(text: string, armoredSignature: string, publicArmor: string): Promise; /** * Generate a GPG key pair * * @param: keyCurve the curve to create a key with * @param: username name of the user (optional) * @param: email email of the user (optional) */ export declare function generateGPGKeyPair(keyCurve: pgp.EllipticCurveName, username?: string | undefined, email?: string | undefined): Promise>; //# sourceMappingURL=opengpgUtils.d.ts.map