18 votes

How to force gpg2 to use expired key?

Use the --faked-system-time option: gpg2 --faked-system-time 20100101T000000 -e -r keyid I would prefer an option that would force encryption to an expired key while also recording the correct time (...
Margaret's user avatar
  • 181
8 votes

OpenSSL ECDSA sign and verify file

Since -ecda-with-SHA1 is not in the man for dgst and there is no -ecda-with-SHA256 I would recommend : Sign : openssl dgst -sha1 -sign private.pem test.pdf > signature.bin Verify : openssl dgst ...
Olivier Lasne's user avatar
8 votes
Accepted

How do I sign a file using SSH and verify it using a certificate authority?

You must specify the certificate when creating the signature, so that it will be embedded in the signature's public_key field instead of the plain pubkey. (When signing, ssh-keygen will automatically ...
u1686_grawity's user avatar
6 votes

How can I use GnuPG with ECDSA keys?

GnuPG 2.1.x does support ECC (including Ed25519); for more info (and examples), see https://www.gnupg.org/faq/whats-new-in-2.1.html#ecc. FYI, you must add the --expert option to reveal the new options....
myroslav's user avatar
  • 311
5 votes
Accepted

Security: Is the Raspberry Pi really stateless?

The RPi is wierd. Your bootloader's actually fired up from the GPU, and your arm processor is a co-processor for the GPU. As such the first stage bootloader is on a rom, can't be changed, and can be ...
Journeyman Geek's user avatar
  • 129k
3 votes

How to use b2sum in keyed mode?

You can't use keys in normal b2sum but I was kind enough to add a few command-line options to the program to use keyed-mode (and spec-compliant HMAC, for people who still want HMAC with BLAKE2b) You ...
Serpent27's user avatar
  • 141
3 votes

create private key from ECDSA public key

You can't. If you could, it would break down asymmetric encryption. The point of asymmetric encryption is to have a key pair with one public key, and a private key. The private key should not be ...
Johan Myréen's user avatar
3 votes

How to use MPIR with Visual Studio?

Is there a way to use mpir package with Visual Studio 2017 C/C++? Yes; Of course you can. You use it like any other C++ interfaces. All MPIR C language types and functions can be used in C++ ...
Ramhound's user avatar
  • 42.8k
3 votes

How to install openssl cryptographic library on Lubuntu

How to install openssl cryptographic library on Lubuntu Use: sudo apt-get install libssl-dev Also see What is “openssl binaries” and “openssl development package”? on the Ubuntu Stack Exchange. ....
jww's user avatar
  • 12.2k
2 votes
Accepted

Can an application that writes any data in a file be suspicious to an antivirus?

An antivirus may flag a file which matches the heuristics of a known virus. You can test this with an eicar test file, a string that isn't actually malicious but should trigger an antivirus to react ...
Jonno's user avatar
  • 21.3k
2 votes

get x and y components of ec public key using openssl

First of all, secp128r1 is outdated. Use curves that give better security for today's standard. See safecurves by Daniel J. Bernstein and Tanja Lange. An Elliptic Curve defined over a field of size q ...
kelalaka's user avatar
  • 447
2 votes

Why are there so many files in C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys

There are four common reasons why the files in the MachineKeys folder are not automatically removed: There is a permission issue that is preventing OS to remove file from that folder. Compare the ...
Ned's user avatar
  • 151
2 votes

HTTPS communication without requesting certificate

You're asking about two different things: hostname leaks by the client sending SNI, and hostname leaks by the server sending a certificate. These are completely independent from each other; SNI does ...
u1686_grawity's user avatar
2 votes

GPG/SSH: Making a key a subkey after the fact

An excellent resource for using YubiKey is the YubiKey Guide, which describes itself as : This is a practical guide to using YubiKey as a SmartCard for storing GPG encryption and signing keys. ...
harrymc's user avatar
  • 482k
2 votes
Accepted

Can You Copy the RAM contents as-is to File-System on Windows

Dumping the contents of memory will not help you here if the software is even vaguely smart about the proper use of public key cryptography. If you need to forcibly dump your memory though, there's a ...
Mokubai's user avatar
  • 92.8k
2 votes
Accepted

Is there a device or executable on Windows that can provide cryptographically secure random bytes via CMD or Powershell?

Anything you can use through .NET (e.g. C#) you can also use through PowerShell, and this includes the Cryptography.RandomNumberGenerator class. (In .NET Core 2.x, this class is implemented via CNG ...
u1686_grawity's user avatar
2 votes
Accepted

How to convert this file into PNG

If you look at https://en.wikipedia.org/wiki/Portable_Network_Graphics you'll get a rough idea of the format. Opening the file you have in a hex editor shows: If you look at a typical PNG file you ...
HelpingHand's user avatar
  • 2,418
2 votes
Accepted

UEFI Encrypt disk on boot

In general, having the system firmware handle decryption of the disk is tricky. At some point, the operating system takes over handling the processing of data from the drive, and it will ...
bk2204's user avatar
  • 2,626
2 votes
Accepted

How to blacklist certain ciphers and key exchange algorithms in ssh and sshd

From the man page for ssh_config: KexAlgorithms Specifies the available KEX (Key Exchange) algorithms. Multiple algorithms must be comma-separated. If the specified list begins with a '+' character,...
garethTheRed's user avatar
  • 4,084
1 vote
Accepted

Duplicity cron not working

your script is faulty. looks like which cannot find duplicity returns empty and your shell tries to run program --encrypt-key which obviously won't work. so first remove $(which ...), so it'll ...
ede-duply.net's user avatar
1 vote
Accepted

Generate entropy to create RSA keys

I've read somewhere that you could potentially dramatically reduce the time to brute-force an RSA private keys if you know the design of the CPU (typically the government). It's important to ...
Ramhound's user avatar
  • 42.8k
1 vote

How should eMMC RPMB shared keys be stored?

One method is to approach it the way TEE solutions do. TEE solutions essentially claim ownership of the RPMB partition. During the initial boot (during the manufacturing process), a unique RPMB ...
Joakim Bech's user avatar
1 vote
Accepted

Cant we use md5 like hash algorithms to store big data?

Hashs are just special purpose fingerprints. If you have a print of my thumb you don't know how my face looks like. By checking the fingerprints is considered sufficient to compare people. Hashing is ...
r2d3's user avatar
  • 3,580
1 vote
Accepted

Load key “ec256.pem”: invalid format is thrown on trying to generate public key from private key

If I look at the curves that need to be supported in the standard, RFC 5656: "Elliptic Curve Algorithm Integration in the Secure Shell Transport Layer" (section 10) then I don't see any ...
Maarten Bodewes's user avatar
1 vote
Accepted

How can I show installed CSP's on my Linux system without using the cpconfig util?

Linux does not have a unified "Crypto Service Providers" architecture. It seems that some commercial products, such as Crypto-Pro, emulate this architecture – but it exists entirely within that ...
u1686_grawity's user avatar
1 vote

How to use MPIR with Visual Studio?

If you have vcpkg install it is real simple: m .\vcpkg install mpir mpir:x64-windows You get debug, release, x32 and x64 could not be easier. If you do not have vcpkg install you should here is a ...
george's user avatar
  • 11
1 vote

How to Optimize a Dictionary / Word List?

Using some tools like grep, sed, awk, & sort you can implement some answers from this other site. They include (if you wanted b then d then everything else normally): Pull out lines in the order ...
Xen2050's user avatar
  • 14k
1 vote

gpg2 --edit-key addphoto / keytocard without password prompt

You can do the following for addphoto: cmd="addphoto\n$var_photo_path\ny\nPASSPHRASE\nquit\ny\n" echo -e "$cmd" | gpg2 --command-fd 0 --pinentry-mode=loopback --status-fd 2 --edit-key "$keyid"
Alex's user avatar
  • 111
1 vote

gpg2 --quick-addkey without password prompt

Solution close from GPG2 Asks for password even with --passphrase specified Explanation can be found here: https://wiki.archlinux.org/.... adding the following line to the ~/.gnupg/gpg-agent.conf ...
Bourinus's user avatar
1 vote
Accepted

Windows 7 EFS, where are the FEK stored?

The File Encryption Key (emphasis on the File part) is and always has been stored in the file. That's confirmed by this MS document from the XP era, dated June 2006. Windows 7 was released in 2009. ...
Ben N's user avatar
  • 41k

Only top scored, non community-wiki answers of a minimum length are eligible