Giter Site home page Giter Site logo

keybase / kbpgp Goto Github PK

View Code? Open in Web Editor NEW
535.0 39.0 74.0 24.73 MB

OpenPGP (RFC4880) Implementation in IcedCoffeeScript

Home Page: https://keybase.io/kbpgp

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.01% JavaScript 90.43% CoffeeScript 9.44% Python 0.01% C 0.09% HTML 0.01% Standard ML 0.01% Go 0.02%
openpgp openpgpjs rfc-4880 keybase kbpgp

kbpgp's People

Contributors

0ndorio avatar dependabot[bot] avatar jkolo avatar malgorithms avatar maxtaco avatar mlsteele avatar oconnor663 avatar pzduniak avatar songgao avatar zapu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kbpgp's Issues

Unbox throws an error if it can find the key used to sign

If I get a PGP message that is encrypted and signed, but I don't have the key of the sender (to verify), unbox will throw an error ("key not found"), even if it decrypted ok and has literals.

Maybe unbox should pass back that the message was signed with key(s) but couldn't find them to verify.

make new msgpack system

Following new spec (v5) which has binary and UTF-8 types, and also application-specific types.

`keybase verify dir kbpgp` returns an error ("public key not found")

Hi,

I wanted to try out some of the command-line features of Keybase, and noticed that you could run keybase dir verify on this project after cloning it. Unfortunately, I'm getting the following output after running that command:

warn: gpg: Signature made Thu Sep 18 10:26:36 2014 EDT
warn: gpg:                using RSA key 980A3F0D01FE04DF
warn: gpg: requesting key 980A3F0D01FE04DF from hkp server 127.0.0.1
warn: gpg: key 6052B2AD31A6631C: rejected by import filter
warn: gpg: Total number processed: 1
warn: [GNUPG:] IMPORT_RES 1 0 0 0 0 0 0 0 0 0 0 0 0 0
warn: [GNUPG:] ERRSIG 980A3F0D01FE04DF 1 10 00 1411050396 9
warn: [GNUPG:] NO_PUBKEY 980A3F0D01FE04DF
warn: gpg: Can't check signature: public key not found
error: `gpg` exited with code 2

My installation of gpg is from Homebrew - here's the output of brew info gpg:

gnupg: stable 1.4.18 (bottled)
http://www.gnupg.org/
/usr/local/Cellar/gnupg/1.4.18 (54 files, 5.3M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gnupg.rb

Import private key returns error

I am using kbpgp-1.1.0.js in browser and am having trouble importing a private key.

I am not seeing the private key read into the armor private property on the key proto. The public key works fine. It appears the returned object does not have the private key property or unlock_pgp method.

TypeError: undefined is not a function
at http://localhost:8100/js/services.js:985:24
at http://localhost:8100/lib/kbpgp/rel/kbpgp-1.1.0.js:4950:18
at Deferrals.exports.Deferrals.Deferrals._call (http://localhost:8100/lib/kbpgp/rel/kbpgp-1.1.0.js:26024:16)
at http://localhost:8100/lib/kbpgp/rel/kbpgp-1.1.0.js:26036:26
at exports.trampoline.trampoline (http://localhost:8100/lib/kbpgp/rel/kbpgp-1.1.0.js:26002:14)
at Deferrals.exports.Deferrals.Deferrals._fulfill (http://localhost:8100/lib/kbpgp/rel/kbpgp-1.1.0.js:26034:16)
at http://localhost:8100/lib/kbpgp/rel/kbpgp-1.1.0.js:4946:28
at KeyManager.unlock_pgp (http://localhost:8100/lib/kbpgp/rel/kbpgp-1.1.0.js:4948:15)
at http://localhost:8100/js/services.js:981:20
at http://localhost:8100/lib/kbpgp/rel/kbpgp-1.1.0.js:4915:18

            kbpgp.KeyManager.import_from_armored_pgp({
                    armored: pair.publicKeyArmored
                }, function(err, imported) {
                    if (!err) {
                        imported.merge_pgp_private({
                            armored: pair.privateKeyArmored
                        }, function(err) {
                            if (!err) {
                                if (imported.is_pgp_locked()) {
                                    imported.unlock_pgp({
                                        passphrase: pin
                                    }, function(err) {
                                        if (!err) {
                                            var ring = new kbpgp.keyring.KeyRing;
                                            var kms = [imported];
                                            for (var i in kms) {
                                                ring.add_key_manager(kms[i]);
                                            }
                                            kbpgp.unbox({keyfetch: ring, armored: msg }, function(err, literals) {
                                                if (err != null) {

                                                } else {
                                                    deferred.resolve(literals[0].toString());
                                                }
                                            });
                                        }
                                    });
                                }
                            }
                        });
                    }
                });

OpenPGP.js

cool stuff you guys are doing.

I'm a contributor to OpenPGP.js and I was wondering how we might share code more effectively. The library has improved quite a bit in terms of code quality and testing in the last 6 months and we just underwent our first complete security audit:
https://github.com/openpgpjs/openpgpjs/wiki/Cure53-security-audit

If I'm not mistaken this library is based on OpenPGP.js?

Thanks

Cannot read property 'passphrase' of undefined

I was following the examples for using the key manager to generate a key pair, and I am getting this error (trying to export the private key).

/home/ubuntu/.nvm/v0.10.26/lib/node_modules/kbpgp/lib/keymanager.js:1390
      passphrase = _arg.passphrase, asp = _arg.asp, regen = _arg.regen;
                   ^
TypeError: Cannot read property 'passphrase' of undefined
    at KeyManager.export_pgp_private_to_client     (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/kbpgp/lib/keymanager.js:1390:24)
    at KeyManager.export_pgp_private     (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/kbpgp/lib/keymanager.js:1408:48)
    at /home/ubuntu/workspace/pgp.js:40:13
    at KeyManager.sign     (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/kbpgp/lib/keymanager.js:1539:18)
    at Deferrals.exports.Deferrals.Deferrals._call     (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/kbpgp/node_modules/iced-runtime/lib/runtime.js:86:16)
    at exports.Deferrals.Deferrals._fulfill     (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/kbpgp/node_modules/iced-runtime/lib/runtime.js:98:26)
    at exports.trampoline.trampoline     (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/kbpgp/node_modules/iced-runtime/lib/runtime.js:64:14)
    at Deferrals.exports.Deferrals.Deferrals._fulfill     (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/kbpgp/node_modules/iced-runtime/lib/runtime.js:96:16)
    at ret (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/kbpgp/node_modules/iced-runtime/lib/runtime.js:29:18)
    at Engine.sign     (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/kbpgp/lib/keymanager.js:263:20)

here is the code:

alice.export_pgp_private({
  passphrase: "my_secret_phrase"
}, function(err, pgp_private) {
  console.log("Private Key: ", pgp_private);
});

Can't parse v3 signatures

We have the wrong ASN codes for the hashes, need to use different ones, according to the RFC. If we're not going to handle v3, we should make a better error.

DSA Support

A lot of places we have hard-coded RSA support. We should fix this.

See openpgp.KeyMaterial::get_klass as an example.

Better warnings system

Right now we have something in the KeyBlock processor when reading in keyblocks for signatures that we're skipping. We probably need a better system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.