* [gentoo-user] zip file encrypt from file manager context menu
@ 2020-07-16 20:32 thelma
2020-07-16 21:40 ` Ashley Dixon
0 siblings, 1 reply; 2+ messages in thread
From: thelma @ 2020-07-16 20:32 UTC (permalink / raw
To: Gentoo mailing list
zip - has a switch "-e" encrypt
It works from command line but I'm not sure how to enter it in XFCE in
in custom action that will appear in file manager context menu.
I have 7za that works:
7za a file.zip %N -tzip -mem=AES256 -mx9 -pxxxxxx
but zip:
zip file %N -exxxxx
doesn't work. I am missing something.
And I have no clue where did I get in 7za parameter: -mem=AES256 -mx9
--
Thelma
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-user] zip file encrypt from file manager context menu
2020-07-16 20:32 [gentoo-user] zip file encrypt from file manager context menu thelma
@ 2020-07-16 21:40 ` Ashley Dixon
0 siblings, 0 replies; 2+ messages in thread
From: Ashley Dixon @ 2020-07-16 21:40 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3200 bytes --]
On Thu, Jul 16, 2020 at 02:32:49PM -0600, thelma@sys-concept.com wrote:
> zip - has a switch "-e" encrypt
>
> It works from command line but I'm not sure how to enter it in XFCE in
> in custom action that will appear in file manager context menu.
>
> I have 7za that works:
> 7za a file.zip %N -tzip -mem=AES256 -mx9 -pxxxxxx
>
> but zip:
> zip file %N -exxxxx
7za accepts the password as part of the command-line invocation, and zip does
not. It's actually quite appalling, from a security perspective, that 7za
allowing the echoing and saving (in the history) of the password. From the
manual page of zip(1):
-e
--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.
Since it requires stderr (although I think this should be "stdin") on the
terminal, you probably won't be able to set this up to use be a context menu
option, unless you want to make the context menu button invoke a terminal
window; that's probably the only plausible solution.
> And I have no clue where did I get in 7za parameter: -mem=AES256 -mx9
Again, this can be explained by reading the manual page of 7za(1), although it
does require a bit of extra digging, and probably requires p7zip to be emerged
with the `doc` USE-flag. The "-mx[=]9" option is explained in the "EXAMPLE 1"
section of the man page:
-mx=9 level of compression = 9 (Ultra)
I also think you made a slight error when typing "-mem=AES256". The "-mem"
option does exist, but it is used to specify the amount of memory used by PPMd,
not any sort of encryption algorithm:
mem={Size}[b|k|m|g]
Sets the size of memory used for PPMd. You must specify the size
in bytes, kilobytes, or megabytes. The maximum value is 2GB =
2^31 bytes. The default value is 24 (16MB). If you do not
specify any symbol from the set [b|k|m|g], the memory size will
be calculated as (2^Size) bytes. PPMd uses the same amount of
memory for compression and decompression.
"-em", however, makes a lot more sense, and is used to set the encryption method
on the "zip" module:
em={EncryptionMethodID} [default: ZipCrypto]
Sets a encryption method: ZipCrypto, AES128, AES192, AES256
To find the full documentation of the various switches on your system, emerge
p7zip with `doc` and execute `qfile method.htm` and find the relevant file
belonging to p7zip. The docs are really impressive and comprehensive, should you
want to learn more about becoming a power-user of p7zip (I am not one; I just
installed it now to investigate your issue).
Hope this helps,
Ashley.
--
Ashley Dixon
suugaku.co.uk
2A9A 4117
DA96 D18A
8A7B B0D2
A30E BF25
F290 A8AA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-16 21:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-16 20:32 [gentoo-user] zip file encrypt from file manager context menu thelma
2020-07-16 21:40 ` Ashley Dixon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox