Generating a pgp key from an initial private/material key
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Some library allows me to generate a pgp key pair in a such a way:
var options =
curve: 'secp256k1',
userId: 'Hamlet <hamlet@example.net>',
passphrase: 'To be, or not to be: that is the question',
material:
key: privateKey,
subkey: privateKey
;
openpgp.generateKeyPair(options).then(function(keypair) {
// success
var privkey = keypair.privateKeyArmored;
var pubkey = keypair.publicKeyArmored;
//.........
That is, given some initial privateKey/material in addition to user_id/passphrase, it generates or perhaps converts into a pgp key.
I wonder, is there a way to do the same things with the standard gpg utility that comes with Linux? I know it accepts userId and passphrase as arguments, but does it accept as an argument something that corresponds to "material" private key in that library?
Or may there a way which include more steps to achieve the same result of generating openpg key pair?
security encryption gpg pgp
add a comment |Â
up vote
0
down vote
favorite
Some library allows me to generate a pgp key pair in a such a way:
var options =
curve: 'secp256k1',
userId: 'Hamlet <hamlet@example.net>',
passphrase: 'To be, or not to be: that is the question',
material:
key: privateKey,
subkey: privateKey
;
openpgp.generateKeyPair(options).then(function(keypair) {
// success
var privkey = keypair.privateKeyArmored;
var pubkey = keypair.publicKeyArmored;
//.........
That is, given some initial privateKey/material in addition to user_id/passphrase, it generates or perhaps converts into a pgp key.
I wonder, is there a way to do the same things with the standard gpg utility that comes with Linux? I know it accepts userId and passphrase as arguments, but does it accept as an argument something that corresponds to "material" private key in that library?
Or may there a way which include more steps to achieve the same result of generating openpg key pair?
security encryption gpg pgp
What format is the existing key in? Anyway, for properly recreating an existing OpenPGP key, you must also specify the creation timestamp (it is included when calculating the key's fingerprint generally used for identification of a specific key in OpenPGP).
â Jens Erat
Oct 21 '17 at 7:17
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Some library allows me to generate a pgp key pair in a such a way:
var options =
curve: 'secp256k1',
userId: 'Hamlet <hamlet@example.net>',
passphrase: 'To be, or not to be: that is the question',
material:
key: privateKey,
subkey: privateKey
;
openpgp.generateKeyPair(options).then(function(keypair) {
// success
var privkey = keypair.privateKeyArmored;
var pubkey = keypair.publicKeyArmored;
//.........
That is, given some initial privateKey/material in addition to user_id/passphrase, it generates or perhaps converts into a pgp key.
I wonder, is there a way to do the same things with the standard gpg utility that comes with Linux? I know it accepts userId and passphrase as arguments, but does it accept as an argument something that corresponds to "material" private key in that library?
Or may there a way which include more steps to achieve the same result of generating openpg key pair?
security encryption gpg pgp
Some library allows me to generate a pgp key pair in a such a way:
var options =
curve: 'secp256k1',
userId: 'Hamlet <hamlet@example.net>',
passphrase: 'To be, or not to be: that is the question',
material:
key: privateKey,
subkey: privateKey
;
openpgp.generateKeyPair(options).then(function(keypair) {
// success
var privkey = keypair.privateKeyArmored;
var pubkey = keypair.publicKeyArmored;
//.........
That is, given some initial privateKey/material in addition to user_id/passphrase, it generates or perhaps converts into a pgp key.
I wonder, is there a way to do the same things with the standard gpg utility that comes with Linux? I know it accepts userId and passphrase as arguments, but does it accept as an argument something that corresponds to "material" private key in that library?
Or may there a way which include more steps to achieve the same result of generating openpg key pair?
security encryption gpg pgp
asked Oct 21 '17 at 3:27
Oari
1
1
What format is the existing key in? Anyway, for properly recreating an existing OpenPGP key, you must also specify the creation timestamp (it is included when calculating the key's fingerprint generally used for identification of a specific key in OpenPGP).
â Jens Erat
Oct 21 '17 at 7:17
add a comment |Â
What format is the existing key in? Anyway, for properly recreating an existing OpenPGP key, you must also specify the creation timestamp (it is included when calculating the key's fingerprint generally used for identification of a specific key in OpenPGP).
â Jens Erat
Oct 21 '17 at 7:17
What format is the existing key in? Anyway, for properly recreating an existing OpenPGP key, you must also specify the creation timestamp (it is included when calculating the key's fingerprint generally used for identification of a specific key in OpenPGP).
â Jens Erat
Oct 21 '17 at 7:17
What format is the existing key in? Anyway, for properly recreating an existing OpenPGP key, you must also specify the creation timestamp (it is included when calculating the key's fingerprint generally used for identification of a specific key in OpenPGP).
â Jens Erat
Oct 21 '17 at 7:17
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Yes.
GNUPG can use an existing key. You need to activate the "expert" option in order to reveal the menu item, if you are using the interactive interface. If you are using GNUPG 2.2.1, you'll see something like this:
$gpg --expert --full-gen-key
gpg (GnuPG) 2.2.1; Copyright (C) 2017 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(7) DSA (set your own capabilities)
(8) RSA (set your own capabilities)
(9) ECC and ECC
(10) ECC (sign only)
(11) ECC (set your own capabilities)
(13) Existing key
Your selection?
Choose option 13 to use existing PGP key material. You will need to know the keygrip of the starting key. For existing PGP keys working with GPG:
$gpg --with-keygrip --list-secret-keys [keyid]
As far as I understand it, this is a new feature so all the bugs may not be worked out yet... and probably why it's hidden in the "expert" menu. A few simple tests of mine show that it seems to work well with RSA keys, but breaks with Curve 25519 keys.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Yes.
GNUPG can use an existing key. You need to activate the "expert" option in order to reveal the menu item, if you are using the interactive interface. If you are using GNUPG 2.2.1, you'll see something like this:
$gpg --expert --full-gen-key
gpg (GnuPG) 2.2.1; Copyright (C) 2017 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(7) DSA (set your own capabilities)
(8) RSA (set your own capabilities)
(9) ECC and ECC
(10) ECC (sign only)
(11) ECC (set your own capabilities)
(13) Existing key
Your selection?
Choose option 13 to use existing PGP key material. You will need to know the keygrip of the starting key. For existing PGP keys working with GPG:
$gpg --with-keygrip --list-secret-keys [keyid]
As far as I understand it, this is a new feature so all the bugs may not be worked out yet... and probably why it's hidden in the "expert" menu. A few simple tests of mine show that it seems to work well with RSA keys, but breaks with Curve 25519 keys.
add a comment |Â
up vote
0
down vote
Yes.
GNUPG can use an existing key. You need to activate the "expert" option in order to reveal the menu item, if you are using the interactive interface. If you are using GNUPG 2.2.1, you'll see something like this:
$gpg --expert --full-gen-key
gpg (GnuPG) 2.2.1; Copyright (C) 2017 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(7) DSA (set your own capabilities)
(8) RSA (set your own capabilities)
(9) ECC and ECC
(10) ECC (sign only)
(11) ECC (set your own capabilities)
(13) Existing key
Your selection?
Choose option 13 to use existing PGP key material. You will need to know the keygrip of the starting key. For existing PGP keys working with GPG:
$gpg --with-keygrip --list-secret-keys [keyid]
As far as I understand it, this is a new feature so all the bugs may not be worked out yet... and probably why it's hidden in the "expert" menu. A few simple tests of mine show that it seems to work well with RSA keys, but breaks with Curve 25519 keys.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Yes.
GNUPG can use an existing key. You need to activate the "expert" option in order to reveal the menu item, if you are using the interactive interface. If you are using GNUPG 2.2.1, you'll see something like this:
$gpg --expert --full-gen-key
gpg (GnuPG) 2.2.1; Copyright (C) 2017 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(7) DSA (set your own capabilities)
(8) RSA (set your own capabilities)
(9) ECC and ECC
(10) ECC (sign only)
(11) ECC (set your own capabilities)
(13) Existing key
Your selection?
Choose option 13 to use existing PGP key material. You will need to know the keygrip of the starting key. For existing PGP keys working with GPG:
$gpg --with-keygrip --list-secret-keys [keyid]
As far as I understand it, this is a new feature so all the bugs may not be worked out yet... and probably why it's hidden in the "expert" menu. A few simple tests of mine show that it seems to work well with RSA keys, but breaks with Curve 25519 keys.
Yes.
GNUPG can use an existing key. You need to activate the "expert" option in order to reveal the menu item, if you are using the interactive interface. If you are using GNUPG 2.2.1, you'll see something like this:
$gpg --expert --full-gen-key
gpg (GnuPG) 2.2.1; Copyright (C) 2017 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(7) DSA (set your own capabilities)
(8) RSA (set your own capabilities)
(9) ECC and ECC
(10) ECC (sign only)
(11) ECC (set your own capabilities)
(13) Existing key
Your selection?
Choose option 13 to use existing PGP key material. You will need to know the keygrip of the starting key. For existing PGP keys working with GPG:
$gpg --with-keygrip --list-secret-keys [keyid]
As far as I understand it, this is a new feature so all the bugs may not be worked out yet... and probably why it's hidden in the "expert" menu. A few simple tests of mine show that it seems to work well with RSA keys, but breaks with Curve 25519 keys.
answered Oct 23 '17 at 0:35
RubberStamp
1,4751216
1,4751216
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f399473%2fgenerating-a-pgp-key-from-an-initial-private-material-key%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
What format is the existing key in? Anyway, for properly recreating an existing OpenPGP key, you must also specify the creation timestamp (it is included when calculating the key's fingerprint generally used for identification of a specific key in OpenPGP).
â Jens Erat
Oct 21 '17 at 7:17