Разрешенное использование ключей может быть изменено, но инструмент gpg
не поддерживает его (даже в версии 2). Чтобы изменить использование ключа, вам необходимо изменить gpg
. Основная идея подробно описана в ветке в списке рассылки gnupg-users
: информация об использовании передается с помощью самоподписи, поэтому вам нужно изменить синтаксический анализатор использования, чтобы принудительно установить значение вас интересует, а затем создайте новую самоподпись на вашем ключе, например, изменив дату истечения срока действия вашего ключа.
Из справочной страницы zip
,
-P password
--password password
Use password to encrypt zipfile entries (if any). THIS IS INSECURE! Many multi-user operating systems provide ways for any user to see the current command line of any other user; even
on stand-alone systems there is always the threat of over-the-shoulder peeking. Storing the plaintext password as part of a command line in an automated script is even worse. Whenever
possible, use the non-echoing, interactive prompt to enter passwords. (And where security is truly important, use strong encryption such as Pretty Good Privacy instead of the relatively
weak standard encryption provided by zipfile utilities.)
Как указано на странице руководства, ЭТО ОЧЕНЬ НЕБЕЗОПАСНО!
Итак, вы можете попробовать следующее: Снова со страницы руководства zip
,
--encrypt
Encrypt the contents of the zip archive using a password which is entered on the terminal in response to a prompt (this will not be echoed; if standard error is not a tty, zip will exit
with an error). The password prompt is repeated to save the user from typing errors.
Команда звучит примерно так:
zip --encrypt foo.zip foo.txt
который запрашивает пароль на терминале,
Enter password:
Verify password:
updating: foo.txt (stored 0%)
ВНИМАНИЕ:Шифрование, используемое zip
, не очень надежное. Его можно легко взломать!