Re: sha256 of libgcrypt is 10 times slower then busybox sha25sum util on qualcomm IPQ4018 board

2021-06-08 Thread NIIBE Yutaka
Hello,

袁建鹏 wrote:
> Caculate the sha256 of a 6MB file need 3 secoands:
>  # TIME=%e time ./fwtool check ipq4018.bin
> 3.23
[...]
> the libgcrypt build configure in IPQ4018 (ARM cortext A7 soc):
> conf := --disable-doc --enable-neon-support \
> --with-libgpg-error-prefix=$(APP_BUILD)/libgpg-error/ \
> --enable-digests="md5 rmd160 sha1 sha256 sha512 blake2" \
> --enable-ciphers="arcfour des aes cast5 chacha20" \
> --enable-pubkey-ciphers="rsa dsa ecc" \
> CFLAGS="-Wno-switch"

What compiler are you using?  If it emits code which uses integer unit
for FPU/vector operations, it's better to use --disable-neon-support
to build libgcrypt, instead.

> Is this a problem ? the busybox code seems no hardware support. why
> libgcrypt is slower so much than busybox.

It looks like busybox code only uses integer operations (no vector
operations) for ARM.
-- 

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Re: GPG : "No secret key found" error

2021-06-08 Thread Robert J. Hansen via Gnupg-users
Please do not send HTML to this mailing list.  Many of our members 
refuse to open HTML emails from unknown parties, so when you send HTML 
email to this list you're limiting the number of people who can see your 
question -- and maybe be able to help you!


Step 2. Instead, I have thought of storing the passphrase in a file 
(passphrase.dat.pgp), encrypted that file without password and passing 
the password to do the work using below command.


How exactly do you "encrypt that file without password"?

At any rate, this is probably a bad idea.  Often the best way to proceed 
for scripting GnuPG tasks is to remove the passphrase from the certificate.


Step 3. To my wonder, when I execute Step 1 first and then Step 2 
(within a short span), it works, but if I directly run Step 2 ( which 
actually will be happening as a part of solution), then it doesn't and 
fails for "No secret key" error.


This tells me that GnuPG is caching your passphrase with gpg-agent. 
When you run it the second time GnuPG sees the passphrase is in the 
cache and uses that, without ever needing to ask you for the passphrase.


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


GPG : "No secret key found" error

2021-06-08 Thread Abhisht Sharma via Gnupg-users
Hi

Please keep me in CC as I think I am not a  subscribed user yet.

GPG:

I am using the gpg command in a UNIX Shell script triggered by the Abinitio
ETL Tool to decrypt my encrypted source files. I am following below steps
to achieve my goal.

Step 1. As a POC, I can successfully executed below command.
gpg --batch --yes --quiet --always-trust -o /home/output_file.dat -d
/etl/inbound/encrypted_file.dat.pgp

The above command will simply ask for password and decrypt the source file.
Please note that I am intentionally not using --passphrase as password will
be exposed to console using ps command.

Step 2. Instead, I have thought of storing the passphrase in a file
(passphrase.dat.pgp), encrypted that file without password and passing the
password to do the work using below command.

echo gpg --batch --yes --quiet --always-trust -d
/home/sharma43/passphrase.dat.pgp | gpg --batch --yes --quiet
--always-trust -o /home/output_file.dat -d
/etl/inbound/encrypted_file.dat.pgp
Now
the problem comes when I execute above command and it fails for below error.

gpg: cancelled by user
gpg:
decryption failed: No secret key

Obviously, I have the required secret key as the POC done in Step 1 was
successful.

Step 3. To my wonder, when I execute Step 1 first and then Step 2 (within a
short span), it works, but if I directly run Step 2 ( which actually will
be happening as a part of solution), then it doesn't and fails for "No
secret key" error.

Can you please explain why this could be happening? Is there a specific
location where GPG private keys should be imported?

Please note the version I am using is "gpg (GnuPG) 2.0.22 version".
-Regards
Abhisht Sharma
+61 420410228
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Re: "gpg: decryption failed: No secret key" after export-import to another host

2021-06-08 Thread sergio via Gnupg-users

Thank you anon85786376!!

--
sergio.

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users