GPG는 대칭적으로 암호화된 파일을 해독할 수 없습니다.

GPG는 대칭적으로 암호화된 파일을 해독할 수 없습니다.

비밀번호를 사용하여 데이터를 암호화 했습니다 gpg -ac --cipher-algo AES256 data. 파일도 다른 머신으로 옮겼는데 gpg, 암호화된 시스템(TrueOS)과 달리 GUI가 설치되어 있지 않았습니다. 다음을 사용하여 파일의 암호를 해독하려고 할 때 gpg -d -o data.d data:

  • gpg: AES256 encrypted data
  • gpg: problem with the agent: End of file
  • gpg:encrypted with 1 passphrase
  • gpg: decryption failed: No secret key

내 파일은 다음과 같습니다.

-----BEGIN PGP MESSAGE----- data in here -----END PGP MESSAGE-----

나는 반대의 접근 방식을 시도했습니다: 파일을 암호화하는 것입니다. 하나를 만들고 임의의 텍스트를 추가한 후 이를 사용하여 암호화를 시도했고 gpg -a --symmetric --cipher-algo AES256 data1 다음과 같은 결과를 얻었습니다.

  • gpg: problem with the agent: End of file
  • gpg: error creating passphrase: Operation cancelled
  • gpg: symmetric encryption of '' failed: Operation cancelled 이것은 매우 이상합니다. 나는 이것이 pinentry와 관련이 있다고 생각합니다. 나는 다음 줄을 내 코드에 추가했습니다 ~/.gnupg/gpg-agent.conf.pinentry-program /usr/bin/pinentry-tty

관련 정보