Dan Uscatu wrote:
ma scuzati, am gresit lista.

am primit un fisier .pgp si doua chei, una privata si una publica. am mai primit si un passphrase.
incerc sa decryptez fisierul:

[EMAIL PROTECTED] pgp]# gpg --list-keys
gpg: checking the trustdb
gpg: no ultimately trusted keys found
[EMAIL PROTECTED] pgp]# gpg --import keys.asc # aici se afla ambele chei, publica si privata
gpg: key xxxxxxxx: secret key imported
gpg: key xxxxxxxx: no valid user IDs
gpg: this may be caused by a missing self-signature
gpg: key xxxxxxxx: public key "xxxxxx [EMAIL PROTECTED]" imported
gpg: WARNING: key xxxxxxxx contains preferences for unavailable
gpg: algorithms on these user IDs:
gpg: "xxxxxx [EMAIL PROTECTED]": preference for cipher algorithm 1
gpg: it is strongly suggested that you update your preferences and
gpg: re-distribute this key to avoid potential algorithm mismatch problems

Set preference list to:
    Cipher: AES256, AES192, AES, CAST5, 3DES
    Digest: SHA1, SHA256, RIPEMD160
    Compression: ZLIB, BZIP2, ZIP, Uncompressed
    Features: MDC, Keyserver no-modify
Really update the preferences? (y/N)

You need a passphrase to unlock the secret key for
user: "xxxxxx [EMAIL PROTECTED]"
1024-bit DSA key, ID xxxxxxxx, created 2006-09-25


gpg: Total number processed: 2
gpg:           w/o user IDs: 1
gpg:               imported: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1

[EMAIL PROTECTED] pgp]# gpg -v -v --decrypt-files xxxxxx.tar.gz.pgp
:marker packet:
50 47 50
:pubkey enc packet: version 3, algo 16, keyid yyyyyyyyyyyyyyyy
       data: [2045 bits]
       data: [2048 bits]
gpg: public key is yyyyyyyy
:encrypted data packet:
       length: unknown
gpg: encrypted with ELG-E key, ID yyyyyyyy
gpg: decryption failed: secret key not available

m-am googlit eu ceva, dar degeaba.
am observat ca ID-ul care apare la decrypt (yyyyyyyyy) nu corespunde cu cel de la import (xxxxxxxxxx). sa-mi fi trimis nenea ala alta cheie, sau sint eu blambec ?
unde gresesc ?

thanks

Am raspuns si pe offtopic, dar poate mai au si altii pareri aici.

Da, daca id-ul nu corespunde atunci nu a facut criptarea corect. Oricum, din ce spui tu aici e facut aiurea (adica nu faci criptare cu chei publice folosind cheia publica si privata din aceasi pereche in aceiasi criptare, pentru ca nu mai are rost algoritmul, folosesti un algoritm pe block (man mcrypt de ex) pentru asta si trimiti o singura cheie.
Uite si cum functioneaza:
Tu ai doua chei, una privata (Xprv) si una publica (Xpub)
Nenea care iti trimite documentul are si el doua chei (Yprv si Ypub)
Nenea cripteaza documentul cu cheia lui privata (Yprv) si cheia ta publica (Xpub). Tu decriptezi documentul cu cheia ta privata (Xprv) si cheia lui publica (Ypub)


_______________________________________________
RLUG mailing list
[email protected]
http://lists.lug.ro/mailman/listinfo/rlug

Raspunde prin e-mail lui