Omnikey 6121: OpenPGP 스마트 카드에 쓸 수 없습니다.

Omnikey 6121: OpenPGP 스마트 카드에 쓸 수 없습니다.

OpenPGPv2 스마트 카드와 함께 Omnikey 6121 스마트 카드 리더를 사용하려고 합니다. 내가 본 것처럼 리더가 인식되었으며 gpg --card-statusURL, 이름 등과 같은 일부 카드 세부 정보를 편집할 수 있었습니다.

그러나 "keytocard" 명령을 실행하려고 하면 다음과 같은 결과가 나타납니다.

gpg: writing new key
gpg: 3 Admin PIN attempts remaining before card is permanently locked

Please enter the Admin PIN
gpg: ccid_transceive failed: (0x10002)
gpg: apdu_send_simple(0) failed: invalid value
gpg: failed to store the key: invalid argument
gpg: error writing key to card: invalid argument

--debug-ccid-driver와 동일한 오류가 발생했습니다.

마찬가지로 "생성"을 실행하면 다음과 같습니다.

gpg/card> generate
Make off-card backup of encryption key? (Y/n) n

Please enter the PIN
What keysize do you want for the Signature key? (2048) 
What keysize do you want for the Encryption key? (2048) 
What keysize do you want for the Authentication key? (2048) 
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 
Key does not expire at all
Is this correct? (y/N) y

You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and E-mail Address in this form:
    "Heinrich Heine (Der Dichter) <[email protected]>"

Real name: Deim0s Anomaly
E-mail address: [email protected]
Comment: 
You selected this USER-ID:
    "Deim0s Anomaly <[email protected]>"

Change (N)ame, (C)omment, (E)-mail or (O)kay/(Q)uit? O
gpg: generating new key
gpg: 3 Admin PIN attempts remaining before card is permanently locked

Please enter the Admin PIN
gpg: please wait while key is being generated ...
gpg: generating key failed
gpg: key generation failed: general error
Key generation failed: general error

gpg/card> 

무슨 일이야? 누군가 도와주실 수 있나요?

답변1

이상하지만 마침내 이 설정이 작동하도록 만들었습니다(옴니키 6121+OpenGPG v2 카드). 이 방법은단순한 필사자같은 결과를 얻을 수 있습니다:

  1. gpg-agent 또는 ssh-agent를 시작하지 않도록 /etc/X11/Xsession.d/를 비활성화합니다 90gpg-agent-mine.90ssh-agent-mine
  2. 설명된 대로 새로운 gpg-agent-wrapper를 생성합니다.https://blog.flameeyes.eu/2010/08/smart-cards-and-secret-agents

(1)에서 gpg-agent를 시작하지 않는 이유는 내가 원했던 --enable-ssh-support를 활성화하지 않기 때문입니다.

를 실행하면 gpg --card-status이제 약간의 지연이 발생한 후 다음이 발생합니다.

gpg: detected reader `OMNIKEY CardMan (076B:6622) 6121 00 00'
Application ID ...: ......

이는 이제 카드가 쓰기 작업에도 작동한다는 것을 의미합니다! 이야! 그리고 나는 keytocard성공했습니다 :)

관련 정보