date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,350,499,117,000 |
What command can be used to determine the used encryption on a LUKS partition (all the relevant information, initialization vector, generation scheme, mode of operation and block cipher primitive)?
|
If the decrypted volume is /dev/mapper/crypto then you can get the information with
dmsetup table crypto
0 104853504 crypt aes-cbc-essiv:sha256 000[...]000 0 254:2 4096
If the encrypted volume is /dev/storage2/crypto then you get the information with
cryptsetup luksDump /dev/storage2/crypto
LUKS header information fo... | How to determine what encryption is being used a LUKS partition? |
1,350,499,117,000 |
I wanted to know why, before encrypting and installing itself on the drive , Kali :
wiped the whole drive
filled the drive with 0s
filled the drive with 1s
filled the drive with Random data
wiped the drive again
I know that Kali isn't meant to be installed, but that's not the point here.
So, how is this useful befor... |
There is no point in doing multiple passes. Once is enough.
Filling a to-be-encrypted drive with random data mainly has two uses:
get rid of old, unencrypted data
make free space indistuingishable from encrypted data
Usually if you encrypt you don't want anyone to see your data. So chances are, if you had old, unenc... | Pre-encryption wipe, why? |
1,350,499,117,000 |
I have generated RSA private key using below command:
openssl genrsa -out privkey.pem 2048
And created a self signed certificate using below command:
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 3650
Now I am trying to convert cacert .pem file to certificate .cer
Any ideas?
|
You can use the following command:
openssl x509 -inform PEM -in cacert.pem -outform DER -out certificate.cer
| Obtain .cer file from .pem file |
1,350,499,117,000 |
I am in progress of resizing a LUKS encrypted partition that contains a single ext4 filesystem (no LVM or something). The cryptsetup FAQ recommends to remove the old partition and recreate it, but that sounds like wasting a lot time. Therefore I want to proceeed by manually, carefully resizing the partition.
So far, I... |
After backing up (step 1) and unmounting (between 2 and 3), run fsck to ensure that the filesystem is healthy:
e2fsck -f /dev/mapper/ExistingExt4
Other than that, the steps are OK.
Purpose of the cryptsetup resize command
what should I choose for $SECTORS? Is this step even necessary?
This step is necessary, otherw... | How can I shrink a LUKS partition, what does `cryptsetup resize` do? |
1,350,499,117,000 |
Suppose I want to encrypt a file so that only I can read it, by knowing my SSH private key password. I am sharing a repo where I want to encrypt or obfuscate sensitive information. By that, I mean that the repo will contain the information but I will open it only in special cases.
Suppose I am using SSH-agent, is the... |
I think your requirement is valid, but on the other hand it is also difficult, because you are mixing symmetric and asymmetric encryption. Please correct me if I'm wrong.
Reasoning:
The passphrase for your private key is to protect your private key
and nothing else.
This leads to the following situation: You want to
... | Encrypting file only with SSH -priv-key? |
1,350,499,117,000 |
I would like to download some files from my server into my laptop, and the thing is that I want this communication to be as stealth and secure as it can be. So, far I came up using VPN, in that way I redirect the whole internet traffic of my laptop via my server. Additionally, I tried to send a file using ftp and obse... |
You can use openssl to encrypt and decrypt using key based symmetric ciphers. For example:
openssl enc -in foo.bar \
-aes-256-cbc \
-pass stdin > foo.bar.enc
This encrypts foo.bar to foo.bar.enc (you can use the -out switch to specify the output file, instead of redirecting stdout as above) using a 256 bit A... | How can I encrypt a file? |
1,350,499,117,000 |
I'm trying to set up OfflineIMAP to authenticate via a gpg encrypted file (that way I can consolidate all my encryption to my gpg-agent process).
From the documentation, it seems the only way to encrypt one's server passwords is to use gnome-keyring (which I'd prefer not to run on my headless server). Is there a way t... |
Another method of leaving offlineimap running with knowledge of your password, but without putting the password on disk, is to leave offlineimap running in tmux/screen with the autorefresh setting enabled in your ~/.offlineimaprc
You need to add autorefresh = 10 to the [Account X] section of the offlineimaprc file, to... | Encrypt OfflineIMAP Password |
1,350,499,117,000 |
I have destroyed my Mint Linux installation. I just wanted access to my remote storefront. So what happened was I was having trouble with ICEauthority file in my home directory. So following different directions on the internet I came to the conclusion that I could set the home directory recursively to chmod 755 to... |
I found that running sudo bash and then running ecryptfs-recover-private as root (rather than via sudo) worked. Not sure why it should be any different.
Edit:
TL;DR:
# ecryptfs-unwrap-passphrase /mnt/crypt/.ecryptfs/user/.ecryptfs/wrapped-passphrase - | ecryptfs-add-passphrase --fnek -
< Type your login password ... | mount: No such file or directory with encrypted recovery |
1,350,499,117,000 |
I want to know the type of symmetric encryption (after authentication) used by ssh in a connection client-server. I'm not sure who determines the encryption. Client or Server?.
I have looked in /etc/ssh/ssh_config (on client) and /etc/ssh/sshd_config (on server) and nothing.
|
Both ssh_config (client configuration) and sshd_config (server configuration) have a Ciphers option that determine the supported ciphers. If the option doesn't appear in the configuration file, a built-in default applies. It is mentioned in the manual page for your version (unless your distribution tweaked the list at... | how to know the type of symmetric encryption used by ssh? |
1,350,499,117,000 |
Is there a preferred method to set up full-disk encryption under OpenBSD, similar to dm-crypt under Linux?
I'm looking for full-disk encryption, as if someone were to steal my notebook they could potentially access the data stored on it. Another reason is that I'm not always next to my notebook, so someone could poten... |
OpenBSD supports full-disk encryption only since OpenBSD 5.3. Earlier versions require a cleartext boot partition. I don't know when the installer was modified to support direct installation to an encrypted partition (with the bootloader still unencrypted of course, because something has to decrypt the next bit).
Ther... | How should one set up full-disk encryption on OpenBSD? |
1,350,499,117,000 |
I've read about how to make hard drives secure for encryption, and one of the steps is to write random bits to the drive, in order to make the encrypted data indistinguishable from the rest of the data on the hard drive.
However, when I tried using dd if=/dev/urandom of=/dev/sda in the past, the ETA was looking to be ... |
dd if=/dev/urandom of=/dev/sda, or simply cat /dev/urandom >/dev/sda, isn't the fastest way to fill a disk with random data. Linux's /dev/urandom isn't the fastest cryptographic RNG around. Is there an alternative to /dev/urandom? has some suggestions. In particular, OpenSSL contains a faster cryptographic PRNG:
opens... | Fast Way to Randomize HD? |
1,350,499,117,000 |
I have a fairly standard disk encryption setup in Debian 5.0.5: unencrypted /boot partition, and encrypted sdaX_crypt that contains all other partitions.
Now, this is a headless server installation and I want to be able to boot it without a keyboard (right now I can boot it only with a keyboard and a monitor attached)... |
You can setup your system to require a key instead of a password and change some scripts to search for this key on a USB stick. I found a detailed explanation for this process on Debian Lenny. There are some notes in the end that describe necessary changes for newer versions of Debian.
| Full disk encryption with password-less authentication in Linux |
1,350,499,117,000 |
I've created a user ... but forgotten the password
mysql> create user 'blayo'@'%' identified by 'right';
Which Linux command line tool can encrypt the password the same way mysql 5.5 does ?
mysql> select Password,User from mysql.user
------------------------------------------+-------+
*920018161824B14A1067A69626595... |
Well, the trivial (perhaps cheating) way would be to run:
mysql -NBe "select password('right')"
This will produce a password using whatever password hashing scheme your version of mysql uses. [EDIT: added -NB, which gets rid of the column names and ascii table art.]
| Encrypt a password the same way mysql does |
1,350,499,117,000 |
2017 WARNING! The accepted answer appears to work, but with recent kernels I discovered that the system would hang as soon as it started swapping. If you attempt using an encrypted swap file, make sure that it actually swaps properly. It took me a long time to figure out why my system kept locking up for no apparent ... |
Indeed, the page describes setting up a partition, but it's similar for a swapfile:
dd if=/dev/urandom of=swapfile.crypt bs=1M count=64
loop=$(losetup -f)
losetup ${loop} swapfile.crypt
cryptsetup open --type plain --key-file /dev/urandom ${loop} swapfile
mkswap /dev/mapper/swapfile
swapon /dev/mapper/swapfile
The re... | How do I set up an encrypted swap file in Linux? |
1,350,499,117,000 |
I recently installed Fedora 20. I don't recall what exact options I chose for encrypting the disk/LVM during installation. It installed fine and I can log in etc. Here is the situation I have:
I booted up with LiveCD and tried the following: (I have installed Fedora20 to /dev/sda3' partition).
If I run cryptsetup ... |
cryptsetup luksDump /dev/fedora/01 shows the LVM logical volume to be a LUKS encrypted volume. The output of pvs or pvdisplay would show the partition /dev/sda3 to be a physical volume. Thus you have LUKS over LVM. At a lower level, you have LVM over PC partition.
The output of lsblk confirms this: sda is a disk, sda3... | How to identify LVM-over-LUKS or LUKS-over-LVM |
1,350,499,117,000 |
Context
Encrypting whole new external hard drive with Luks.
I.e. it is not a system drive (will be used only to store data, not to boot the OS), and it is completely blank.
Observation
All descriptions that I found about how to achieve this go along the lines of:
create a new partition, which is the same size as the ... |
The cryptsetup FAQ mentions whole-disk encryption using LUKS. Basically, cryptsetup doesn’t care what the LUKS device is, partition, disk, or loop device, so you can use whichever is appropriate.
sudo cryptsetup -v -y luksFormat /dev/sda
will create a LUKS container using all of /dev/sda.
Section 2.2 of the FAQ recom... | Encrypting whole disk with Luks (instead of one big encrypted partition) |
1,350,499,117,000 |
I have recently discovered an exploit, where I(or assuming anyone) can re-encrypt my encrypted zip file without having to know the password:
#zip --encrypt encrypted.zip -r dir1/
The above will prompt the user to enter a new password. Is there something I'm missing, or is this a known issue?
|
Zip archives can have multiple passwords for different contained files. Files within an archive are essentially independent of each other - they are compressed without regard for other files, and they are encrypted in the same fashion. Your encrypted.zip will have two (or more) encrypted segments, one with your origin... | Is this a zip encryption bug? |
1,350,499,117,000 |
Is there any way to anonymize http requests through the command line? In other words, is it possible to wget a page without the requester's IP showing up?
|
One method of annoymizing HTTP traffic from the command line is to use tor. This article discusses the method, titled: How to anonymize the programs from your terminal with torify.
General steps from article
You can install the tor package as follows:
Fedora/CentOS/RHEL
$ sudo yum install tor
Ubuntu/Debian
$ sudo ap... | anonymous url navigation in command line? |
1,350,499,117,000 |
From what little I know, in openpgp you have a private key which you keep locked or hidden somewhere and a public key which you can freely share with anybody.
Now I have seen many people attaching .asc file. If I click on that, it reveals the other person's public key.
Is having an .asc file nothing but using the pu... |
Usually, a .asc file is an ASCII-armored representation of key material (or a signature). Your shirish-public-key.txt looks like it’s just that, so if you’re sure it contains the right information you could simply rename it, as you suggest. (I doubt it contains your public key though — that should start with -----BEGI... | How do you generate an .asc file from pgp public key? |
1,350,499,117,000 |
How is it possible, from bash or standard linux command-line tools, to XOR a file against a key? Something like:
cat my1GBfile | xor my1MB.key > my1GBfile.encrypted
Off-topic: I know the encryption is quite weak with this example, but I was just wondering if this is available from bash or standard linux command-line ... |
bash can't deal with ASCII NUL characters, so you won't be doing this with shell functions, you need a small program for it. This can be done in just about any language, but it seems easiest to do it in C, perhaps like this:
#include <stdio.h> ... | XOR a file against a key |
1,350,499,117,000 |
I'm currently playing around and testing ZFS and I really like it. Now I am looking for the best way to use it as a replacement for my standard setup with luks-based full disk encryption.
How is the concept of encryption in ZFS, do I encrypt a whole pool or just individual datasets? My idea is to boot, enter a passphr... |
Encryption was added to ZFS On Linux with the release of version 0.8. So you need at least that version.
In ZFS, encryption is on a per-dataset basis, not on a pool - but, as with most things in ZFS, a dataset can inherit encryption properties from its parent (or from a defined encryptionroot instead of the parent).... | ZFS encrypted pool on Linux? |
1,350,499,117,000 |
The qcow2 image file format for KVM can use AES encryption. The encryption is applied at the cluster level:
Each sector within each cluster is independently encrypted using AES Cipher Block Chaining mode, using the sector's offset (relative to the start of the device) in little-endian format as the first 64 bits of t... |
At least with the Fedora 20 package qemu-img (1.6.2, 10.fc20) does not use AES-NI for AES crypto.
Confirming
One can verify it like this:
Does the CPU have AES-NI?
$ grep aes /proc/cpuinfo -i
For example my Intel Core 7 has this extension.
Install the necessary debug packages:
# debuginfo-install qemu-img
Run qemu... | Does QEMU/KVM use Intel AES instructions for encrypted qcow2 images if the host CPU has them? |
1,350,499,117,000 |
I have installed GRUB2 to an encrypted boot partition, as detailed here.
The chosen hashing algorithm for my luksFormat is sha512, with the default iter-time (which is 2 seconds).
This encrypted partition takes a little over 2 seconds to unlock if done from the command line (either from archiso or from the running sy... |
GRUB is early boot. There is no OS, no Linux available yet, although we tend to forget that since GRUB does so many amazing-crazy things all by itself. So a /proc not found message is not surprising.
SHA512 benefits a lot from 64bit instructions but GRUB might not be able to use those yet. Try SHA256 or SHA1, maybe t... | GRUB takes too long to unlock the encrypted boot partition |
1,350,499,117,000 |
I am a big fan of linux and like trying out new distros now and then. I usually have my home folders and roots in a lvm atop an encrypted partition, but this tends to become cumbersome with every initramfs creation process being more alien than the last one.
I value privacy, but most of my valuable information or per... |
First of all the hassle with encrypted root and early userspace is typically already handled by your distribution (as far as i know Fedora, Debian, Ubuntu and OpenSUSE support encrypted root out of the box). That means you don't have to care for the setup itself.
One reason for encrypting / is just to be sure you don'... | Any reason for encrypted /? |
1,350,499,117,000 |
A vulnerability scan showed that in a Debian 10 system, insecure MAC algorithms are in use: [email protected],[email protected],[email protected],hmac-sha1
When I do ssh -Q mac, I get the following results:
hmac-sha1
hmac-sha1-96
hmac-sha2-256
hmac-sha2-512
hmac-md5
hmac-md5-96
[email protected]
[email protected]
[ema... |
The list of supported MAC algorithms is determined by the MACs option, both in ssh_config and in sshd_config. If it's absent, the default is used. If you want to change the value from the default, either edit the existing entry or add one if it isn't present. For example:
MACs hmac-sha2-256,hmac-sha2-512,[email protec... | How to disable weak HMAC Algorithms? Not found in ssh_config or sshd_config file |
1,350,499,117,000 |
I read man vim, :h -x and :h encryption none of this actually says what algorithm it's encrypted with.
|
:h 'cryptmethod' says that PkZip and Blowfish (new in Vim 7.3) are possible encryption methods. A look around FEAT_CRYPT in vim/src/misc2.c confirms it.
The weak encryption method is documented in PKWARE's zip file format documentation, and the new strong encryption is documented on Bruce Schneier's Blowfish page.
| What encryption does vim -x use? |
1,350,499,117,000 |
Is it possible to convert LUKS2 to LUKS version 1, and by extension, change the use of features that would block such a conversion?
Fedora 30 uses LUKS2 by default, however I ran into a situation where I need to stick with LUKS version 1. Specifically, Relax-and-Recover (rear) does not support LUKS2 at the moment.
Do... |
Converting LUKS1 to LUKS2, then back to LUKS1 works just fine. It's starting out with LUKS2 then converting to LUKS1 that causes problems. Apparently, cryptsetup convert is unable to convert between LUKS2 argon2i keys and LUKS1 pbkdf2 keys.
Setup:
# truncate -s 100M luks1.img
# truncate -s 100M luks2.img
# cryptsetup ... | Convert LUKS2 back to LUKS version 1 |
1,367,338,736,000 |
I'm currently using thunderbird with gnupg to read encrypted emails.
If I understand the swapping behavior correctly, the memory pages containing the decrypted emails might be swapped out and leave traces on the hard disk which may in theory later be recovered forensically.
While it is certainly possible to just use a... |
In the comments, I suggested you create a cgroup, set memory.swappiness to zero (to minimize swapping) and run your application inside of that. If you did that, your application probably wouldn't swap unless you were running so incredibly low on physical memory that swapping pages for programs in that cgroup was the o... | Can swapping be disabled on the application level? |
1,367,338,736,000 |
I am working on my yocto distribution including cryptsetup in the 2.3.2 version
I am running such distribution on a board with 1 GB RAM and I am incurring in an "out of memory" error trying to open an encrypted partition that I am not able to properly debug. Any ideas?
My distro runs from an mSD with 3 partitions; the... |
LUKS2 uses Argon2i key derivation function which is memory-hard -- meaning it requires a lot of memory to open the device to prevent (or at least make it harder) brute force attacks using GPUs. You can check how much memory you need to open your device using cryptsetup luksDump /dev/sda2, look for the line Memory: ... | Open: cryptsetup out of memory ("Not enough available memory to open a keyslot.") |
1,367,338,736,000 |
I want to know how can I create an encrypted password in Ubuntu 14.04 LTS. Tried this:
makepasswd --crypt-md5 password_here
It did not work for me. It is throwing this Error:
sysadmin@localhost:~$ makepasswd --crypt-md5 admin123
makepasswd: Non-argument options specified: admin123
makepasswd: For more information... |
# echo -n admin123 | makepasswd --crypt-md5 --clearfrom -
admin123 $1$ZUNNSLzQ$XsViFC1bhucsr3f8AzMPt/
As commented bellow this command is unsecure. True method - write password in file with text editor, and read password from file.
| How to Create an Encrypted Password |
1,367,338,736,000 |
Is there any way to encrypt a directory using gpg? It seems to only accept files as arguments.
|
Why not tar the files to be encrypted and then encrypt the tarball?
| Encrypt directory with GnuPG? |
1,367,338,736,000 |
So I created a gpg encrypted file with password:
gpg -c passwords.txt.gpg
how can I open it with vi, edit it, then close it? (So that no passwords.txt file will be created, the decrypted passwords.txt is only in the memory! - better: after closing the passwords.txt.gpg file, the memory should be cleaned, so it shoul... |
Original Answer
The gnupg plugin for Vim does this:
This script implements transparent editing of gpg encrypted files. The
filename must have a ".gpg", ".pgp" or ".asc" suffix. When opening
such a file the content is decrypted, when opening a new file the
script will ask for the recipients of the encrypted file... | How to edit a .gpg file with vi? |
1,367,338,736,000 |
I want to store some data encrypted to carry around with me (this includes some scans of relevant paperwork, my TAN List for online banking, my gnupg and ssh keys and stuff like that). So not really a huge amount of data but also more than a little textfile.
What I want is a container I can put on my thumbdrive to car... |
Truecrypt ticks all of those boxes. You have the option of either encrypting the whole USB key, or just having an encrypted container (as a file)
It can then be decrypted regardless of platform, and can be configured to automount.
| Portable encrypted container |
1,367,338,736,000 |
Trying to create GPG keys which will be used for an apt repository hosted on my Centos7 box. I created a new user "apt", and then tried to create the keys, but at the very end, it states that I need a pass phrase, but then instantly closes stating cancelled by user. No it wasn't!
I have since successfully repeated t... |
As to the "cancelled by user" error: GnuPG tries to make sure it's reading the passphrase directly from the terminal, not (e.g.) piped from stdin. To do so, it tries to open the tty directly. Unfortunately, file permissions get in the way — the tty device is owned by the user you log in as. So only that user and root ... | gpg: cancelled by user |
1,367,338,736,000 |
I've got a laptop which I haven't used since the last summer vacation: I did put Debian 7 on it and used Debian's feature to fully encrypt the disk, besides a tiny bootloader (or a tiny partition) I guess (not too sure which encryption this is nor how to find out).
I do know the password of the encrypted filesystem so... |
Full disk encryption is usually done using the dm-crypt Device Mapper target, with a nested LVM (Logical Volume Manager) inside. So to reset your password you'll have to
Unlock/open the crypto container; this is done using cryptsetup
Activate the logical volumes; vgchange is used for this.
Usually you won't need to... | How to reset password on an encrypted fs? |
1,367,338,736,000 |
Now I mount an encrypted folder:
open browser and login to NAS gui
click Control panel -> Shared Folder > Encryption > Mount
enter key
after folder is mounted:
rsync -ah --progress --delete /path/* admin@ipadress:/volume1/path/
Can I bypass 1.-3. and use ssh only?
|
Use the gui to mount the encrypted directory, then login to the synology as root over ssh and type mount. You will see a line like
/volume1/@mycryptdir@ on /volume1/mycryptdir type ecryptfs (rw,relatime,ecryptfs_fnek_sig=88...,ecryptfs_sig=88...,ecryptfs_cipher=aes,ecryptfs_key_bytes=32)
This shows your directory /v... | How can I mount encrypted folder via SSH in Synology NAS? |
1,367,338,736,000 |
When you run luksDump on a LUKS device, I get this:
$ sudo cryptsetup luksDump /dev/sda1
LUKS header information
Version: 2
Epoch: 3
Metadata area: 16384 [bytes]
Keyslots area: 16744448 [bytes]
UUID: 4640c6e4-[…]
Label: (no label)
Subsystem: (no subsystem)
Flags: (no... |
The Epoch increases every time you change anything in your LUKS header (like when adding or removing keys, etc.).
The LUKS2 header specification states:
uint64_t seqid; // sequence ID, increased on update
seqid is a counter (sequential number) that is always increased when
a new update of the header is written. Th... | What is the epoch of LUKS that is shown when running luksDump? |
1,367,338,736,000 |
I am planing to backup data via sending btrfs snapshots to an online storage. The storage is mounted as a LUKS encrypted container file on a cifs share.
Later transfers will be reasonably fast, but for the first one is 1,3TB, which, when I use tc to leave me with a reasonable amount of upstream, will take 23 days.
Now... |
As I understand it, your remote storage is exposed as a filesystem. I don't use btrfs myself but I assume the snapshots are equivalent to one large "full backup" file followed by a number of smaller "incremental" files.
On that basis I'd still go with rsync because it's restartable. You can't use its snazzy delta diff... | Resumable transfer for btrfs send |
1,367,338,736,000 |
I want to boot the Linux from the /boot partition, and also want to encrypt this /boot partition.
[ AFAIK, Grub is unable to find the kernel and initrd from an truecrypted partition or cryptsetup encrypted boot partition. ]
Is there any way to do so ?
|
Yes, using Grub2 you can do this: It has been patched to support not only AES, Twofish, Serpent and CAST5 encryption, but a number of hashing routines such as SHA1, SHA256, SHA512, and RIPEMD160. There is also support for the LUKS on-disk encryption format.
Check out this xercestech post for a full manual walkthrough... | Encrypted Booting |
1,367,338,736,000 |
Releases of gnupg from 2.1.16 (currently 2.1.17) block waiting for entropy only on first invocation.
Note: this isn't an attempt to generate a key, just to decrypt a file and start the agent.
The first time gpg-agent is started, either directly with gpg2 file.gpg or using an application like pass, pinentry appears and... |
I think I know what's going on. In gnupg's agent/gpg-agent.c, this function processes messages from libgcrypt.
/* This is our callback function for gcrypt progress messages. It is
set once at startup and dispatches progress messages to the
corresponding threads of the agent. */
static void
agent_libgcrypt_pro... | gnupg 2.1.16 blocks waiting for entropy |
1,367,338,736,000 |
So.. if there is a bad block on the HDD, what can survive better?
not using FDE (full disc encryption)
using FDE - since the whole disk has "1 partition" - the encrypted one, isn't it more likely to loose all data if there is a HDD error, ex.: bad block?
|
No, I mean yes, I mean... a little bit of both.
If a block is bad, the data of that block is gone. Whether the block contained encrypted data or not, is not relevant at that point. It doesn't make a difference.
Of course there are special cases. If your encryption has a metadata header, such as LUKS does, and the bad ... | Does using full-disk encryption affect the probability of losing data in case of storage errors? |
1,367,338,736,000 |
I know the typical encryption types for Linux are $1$, $2a$, $2y$, $5$, and $6$, but I haven't found any answers for what $y$ is. I'm using the latest version of Kali Linux. The two accounts are dummy accounts made for an exercise.
exam_user_1:$y$j9T$Sn7.l9zwy3VX0vbgSX1JQ0$iHN/q4Q9CPnTxm/x01joswdLKgfbexP1BKCkc13pqI6:1... |
From man 5 crypt, AVAILABLE HASHING METHODS
yescrypt
yescrypt is a scalable passphrase hashing scheme designed by Solar Designer, which is based on Colin Percival's
scrypt. Recommended for new hashes.
Prefix
"$y$"
Hashed passphrase format
\$y\$[./A-Za-z0-9]+\$[./A-Za-z0-9]{,86}\$[./A-Za-z0-9]{43}
... | What's the encryption type $y$ used in /etc/passwd on Kali Linux? |
1,367,338,736,000 |
I'm trying to use cryptdisks_start to open a LUKS device that is defined in my /etc/crypttab. Unfortunately, the command fails with the following error message:
martin ~ # cryptdisks_start luks-01a2e5d8-9211-40ce-b160-d3f973d1a155
* Starting crypto disk...
* luks-01a2e5d8-9211-40ce-b160-d3f973d1a155 (starting)..
* ... |
It doesn't work because the /etc/crypttab line is missing the option keyword luks. Changing the line to this resolved the issue:
luks-01a2e5d8-9211-40ce-b160-d3f973d1a155 UUID=01a2e5d8-9211-40ce-b160-d3f973d1a155 /etc/luks-keys/luks-01a2e5d8-9211-40ce-b160-d3f973d1a155 luks,nofail
This is due to the fact that cryptdi... | cryptdisks_start: precheck failed: the device contains a filesystem type crypto_LUKS |
1,367,338,736,000 |
I wiped the disk using
wipefs -a /dev/sda.
I happily formatted the disk, and it seems that when I'm about to mount /dev/sda3 it says "unknown file system type crypto_LUKS".
I did no encryption on this partition, so it's like the previous configuration is saved somehow.
If I apparently wiped or reset the disk, how ca... |
wipefs -a /dev/sdx only wipes magic signatures on that device, not on its partitions. So at best, it only wipes your partition table, but if you then proceed to re-create the partitions at the same offsets at before, the old data is still there. You'd have to wipe the partitions as well.
wipefs -a /dev/sdx[1-9]* # wip... | Partition still encrypted with luks after wipefs |
1,367,338,736,000 |
I'm puzzled by the hash (ASCII) code stored under Linux (Ubuntu) /etc/shadow.
Taking a hypothetical case, let password be 'test', salt be 'Zem197T4'.
By running following command,
$ mkpasswd -m SHA-512 test Zem197T4
A long series of ASCII characters are generated (This is actually how Linux store in the /etc/shadow)
... |
On Ubuntu/Debian mkpasswd is part of the package whois and implemented in mkpasswd.c which as actually just a sophisticated wrapper around the crypt() function in glibc declared in unistd.h. crypt() takes two arguments password and salt. Password is "test" in this case, salt is prepended by "$6$" for the SHA-512 hash ... | SHA512 salted hash from mkpasswd doesn't match an online version |
1,367,338,736,000 |
Zip encryption has had often a bad reputation of being weak, but some would argue that a zip file encrypted using certain algorithms (such as by using AES), together with strong password, is really safe (see: https://superuser.com/questions/145167/is-zips-encryption-really-bad )
My question is: how strong is the encry... |
File Roller (the GNOME application whose variant/fork/whatever-you-call-it you use) depends on zip.
That should not be the case - according to the fileroller news page, p7zip is used to create zip archives since version 2.23.4 - see this somewhat outdated fileroller news page.
It's also stated on 7-Zip's Wiki page:
... | How strong is the encryption of a zip file in Linux Mint |
1,367,338,736,000 |
I already asked once about LUKS unlocking of multiple HDDs in Linux: LUKS and multiple hard drives.
Now I would like to know how to secure store the keyfile used for the automatic unlock of the associated partitions.
My plan is (if possible):
Encrypt a small USB drive with LUKS that requires a passphrase
Unlock it at... |
Your approach looks good. Some remarks though:
If you want to encrypt rootfs, you'll need to use initrd (to have some minimal unencrypted system that will process the encrypted partitions).
If the USB device is removable, both initrd and kernel can be stored on the USB to heighten tamper resistance (supposing you mak... | LUKS storing keyfile in encrypted usb drive |
1,367,338,736,000 |
My previous question produced the commands to add an encrypted swap file:
# One-time setup:
fallocate -l 4G /root/swapfile.crypt
chmod 600 /root/swapfile.crypt
# On every boot:
loop=$(losetup -f)
losetup ${loop} /root/swapfile.crypt
cryptsetup open --type plain --key-file /dev/urandom ${loop} swapfile
mkswap /dev/map... |
You may want to have a look at:
crypttab(5)
[email protected](8)
systemd-cryptsetup-generator(8)
Those work for encrypted volumes backed by block devices. They should also work for file backed volumes.
Update:
This does work for me:
# Automatically generated by systemd-cryptsetup-generator
[Unit]
Description=Crypto... | How do I configure systemd to activate an encrypted swap file? |
1,367,338,736,000 |
I am using manjaro with full disk encrypt, however, the wait time at boot for decrypt is very long ( i assume because of a high difficulty setting) . How can I change encryption difficulty/ wait time of the encryption setup during install?
|
Too much passphrase hashing?
If it's only slow because you're waiting for a lot of passphrase hashing iterations, you could add a new passphrase with a quicker --iter-time, but that could reduce security & allow faster guessing of passphrases. If you wanted to wait 1 second (1000ms) then use a command like:
cryptsetu... | How to change luks encryption difficulty on manjaro full disk encrypt |
1,367,338,736,000 |
I decided to encrypt my root partition with LUKS+LVM.
My ThinkPad setup:
Samsung 830 128GB SSD
750GB HDD
Core 2 Duo 2,5 GHz P9500
8GB RAM
But the more I read, the less I understand about those two following subjects:
1a. The cipher
I was going to use SHA1 instead of 2/512 (as some suggest), because of that quote fro... |
1a - it really doesn't matter all that much. which ever hash you use for the key derivation function, LUKS makes sure it will be computationally expensive. It will simply loop it until 1 second real time has passed.
1b - the key derivation method has no influence on performance. the cipher itself does. cryptsetup benc... | Trying to understand LUKS encryption |
1,367,338,736,000 |
All my partitions are encrypted (/ and /home), but the /boot partition has to remain unencrypted and is open for manipulation. I was thinking about hashing the kernel on bootup and checking the result against a stored value (generated on compile, saved on my encrypted drive) to see if someone, somehow manipulated the ... |
What you're looking for — verifying that the operating system running on the computer is one you trust — is called trusted boot. (It's one of several things that are sometimes called trusted boot). Your proposed method does not achieve this objective.
Encryption does not provide data integrity or authenticity. In othe... | Signing/Checksumming the kernel to prevent/detect manipulation |
1,367,338,736,000 |
Basically, I have an email account I can access as POP3 or IMAP. I want to take all incoming emails, encrypt them, and then forward the encrypted version to my gmail account (so I can see the subject/notifications on my phone/gmail account; and possibly decrypt the message with a passphrase -- though this last step d... |
I just saw the other response and guess I never wrote up the solution I actually implemented. It turns out that python imaplib is straightforward and I wrote a very quick script. Barring a few changes (e.g., anonymizing my various USERNAMEs, EMAILPASSWORD, WORKDOMAINNAME, MYGPGKEYID). I also don't just send encrypt... | Receive Pop/IMAP email and then forward as encrypted to gmail |
1,367,338,736,000 |
I'm askin myself, is there any software who can encrypt my whole hard drive with Linux Mint 17.3 on it AFTER the installation? Like TrueCrypt for Windows?!
If not and I've to reinstall everthing is there any possibility to safe all my datas (including the installed programs) to restore it after an successful installat... |
If you want the entire hard drive encrypted, even the Linux Mint system partitions, swap, your home, the whole works, then I suspect the easiest would be to:
backup your data (the Mint Backup Tool you linked an image to should work, but double-check for files you want backed up that aren't in your home)
reinstall wit... | Is there any way to fully encrypt my hard-drive AFTER an installation of Linux Mint? |
1,367,338,736,000 |
I'm trying to recover my files from a now broken Antergos install, and have run into trouble because the user/non-boot partition is encrypted with LUKS encryption.
I'm booting from an Ubuntu 18.04 bootable USB drive so I can backup the directories where I had data I wanted, and didn't realize it was encrypted until ... |
To recover your files you will first need to open your LUKS container. This will make your LVM logical volumes accessible. Then, you can mount the appropriate logical volume to gain access to the files. I'll assume that once you have access to the files you'll know what to do.
Opening the LUKS container
To open the LU... | How to mount and de-encrypt a LUKS encrypted partition to recover files [closed] |
1,367,338,736,000 |
I'm looking for a solution to fully encrypt my dual-boot SSD drive (it's still new and empty, and I want to set up encryption before I put anything on it).
While there's a lot of chaos on the web regarding that question, it appears that TrueCrypt might be able to do this, although I might need its boot loader on an ex... |
If the whole disk is encrypted, and some pre-boot tool asks the user for a key to decrypt it, doesn't that mean this tool has to run beneath the OS that's going to boot?
Yes, pretty much. Hardware-based full disk encryption does this: the encryption is handled entirely by the device (hard disk/flash) or possibly in ... | How does pre-boot authentication with disk encryption work technically? |
1,367,338,736,000 |
On my Debian-Testing-System, I want to completely conceal the home folders. That means, I not only want the data to be encrypted, but I also want to preclude determining any (or most) information from the encrypted data.
For instance, also file names should be encrypted. But not being an expert for data protection, ma... |
Ecryptfs stores each encrypted file in one file (the lower file, in ecryptfs terminology). The directory structure of the lower files mirrors that of the payload files, although the file names are encrypted. The metadata (modification times, in particular) of the lower files also reveals that of the payload files. The... | conceal home folder completely - is ecryptfs the right choice? |
1,367,338,736,000 |
Does anyone have a working implementation using keyfiles, preferably on SD Card, instead of a prompt for ZFS? I know how to do this with linux LVM/LUKS. In my opinion the FreeBSD full disk encryption solutions are WAY more secure, but I would really like to use keyfiles instead of getting prompted during boot.
I can... |
Update from January 2020
This question was answered in 2011, and the answer I gave pertains specifically to contemporary Solaris 11 behavior. This does not apply to OpenZFS, illumos, or ZFS on Linux.
That being said, the original answer remains, for posterity.
You have to create your key first. ZFS supports two types... | How to use keyfiles,for ZFS whole disk encryption? |
1,367,338,736,000 |
Notice: the very same vulnerability has been discussed in this question, but the different setting of the problem (in my case I don't need to store the passphrase) allows for a different solution (i.e. using file descriptors instead of saving the passphrase in a file, see ilkkachu's answer).
Suppose I have a symmetric... |
gpg --passphrase $my_passphrase
My question: is this safe? Will the variable $my_passphrase and/or the decrypted output be visible/accessible in some way?
No, that's not really considered safe. The passphrase will be visible in the output of ps, just like all other running processes' command lines. The data itself... | Security of bash script involving gpg symmetric encryption |
1,367,338,736,000 |
I am working on our Debian server on which we have a Raid drive encrypted with 2 devices. I did this around 1.5 years back and have never rebooted since. Now, we want to reboot for some reasons, but I have to make sure that the password I have is the correct one, or we will be stuck.
How can we verify the password fo... |
mdadm does not encrypt, so what did you use? LUKS?
With LUKS you can just see if cryptsetup luksAddKey /dev/md0 or similar will accept your password. Otherwise, if the container is still open, do a dmsetup table --showkeys that gives you all the parameters and master key which allows you to circumvent LUKS...
I guess... | Debian : Verify disk encryption password for already mounted system |
1,367,338,736,000 |
Encryption/decryption is often the main bottleneck when accessing an encrypted volume. Would using a filesystem with a fast transparent compression (such as BTRFS + LZO) help? The idea is that there would be less data to encrypt, and if the compression is significantly faster than the encryption algorithm, the overal... |
I did a small benchmark. It only tests writes though.
Test data is a Linux kernel source tree (linux-3.8), already unpacked into memory (/dev/shm/ tmpfs), so there should be as little influence as possible from the data source. I used compressible data for this test since compression with non-compressible files is non... | Will using a compressed filesystem over an encrypted volume improve performance? |
1,413,031,625,000 |
Debian Jessie, XFCE 4.10, KeePass2, IceDove (with Enigmail)..
I'm using KeePass2 generated passwords for my gpg private key, to de/encrypt mails. Icedove is my client which uses the enigmail.
As soon as I want to de/encrypt a mail pinentry (pinentry-gtk2) pops up and I can't paste into the password field, nor can I mo... |
In Keepass2, "Add Entry," and set "Title" to "GPG." Move from "Entry" tab to "Auto-Type" tab. Select "Override default sequence" and set to "{PASSWORD}".
Before you send email, open Keepass2 with Keepass2 password. Ask IceDove with Enigmail to "Send" and pinentry should appear (locking keyboard, preventing "Ctrl+V" (o... | Usage of pinentry with keepass2 for gpg mail encryption |
1,413,031,625,000 |
I'm finding a lot of conflicting information out there, and as of yet haven't found anyone trying to pull together all of the components that I'm trying to do, so I'm hoping someone who understands SSD, encrypted LVMs and so on can stop by and help out.
Basically, my system is a laptop with:
/dev/sda: 32 GB SSD
/dev/... |
I'm running btrfs on top of dm-crypt for a while now. Since btrfs is a multi-device capable and dynamic (grow, shrink etc) filesystem, I don't really need the LVM layer for my purposes.
Other than that, use a recent enough dm-crypt that has --allow-discards capability, 3.1+ kernel and a filesystem that also allows dis... | LVM + LUKS + SSD + Gentoo -- making it all work together |
1,413,031,625,000 |
I'm considering purchasing a 850 Evo but I'm unsure as to the security of the encryption, especially on Linux. My research has shown that bitlocker can be used on windows instead of the insecure ATA password, but is there a similar solution for Linux?
|
If you have the AES-NI instructions set in your CPU, then it is also hardware accelerated.
Also I don't see a difference between BitLocker and LUKS. It's a similar approach but at least LUKS is open source, so I tend to trust that better.
And I would trust more LUKS than the OPAL hw standard found in some HDD/SSD. At... | Samsung 850 Evo SSD Hardware Encryption |
1,413,031,625,000 |
(This is not about restricting client access, for which ext3 permissions do the trick)
I'd like to encrypt the data on my NAS drive (Buffalo LinkStation Pro with SSH access enabled, if that matters) in a user-friendly way. Currently, a truecrypt container has to be manually mounted via SSH and also unmounted again (un... |
I'm seeing a sketch of a solution using Samba "logon scripts" - client-side code that runs after a samba login - but a complete solution needs to complete the sketch with details. Also related are "preexec scripts" - server-side code that runs during a samba login.
Referencing the smb.conf man page
logon script (G)
T... | How to set up an encrypted directory to be mounted only during samba access? |
1,413,031,625,000 |
Consider this Shadow string
$y$j9T$PaFEMV0mbpeadmHDv0Lp31$G/LliR3MqgdjEBcFC1E.s/3vlRofsZ0Wn5JyZHXAol5
There are 4 parts
id : y (yescrypt)
param : j9T
salt : PaFEMV0mbpeadmHDv0Lp31
hash : G/LliR3MqgdjEBcFC1E.s/3vlRofsZ0Wn5JyZHXAol5
Q:
What does j9T in param field mean?
Are there other options in this field?
Where c... |
Disclaimer
Below are my own findings and the way I interpreted them without having an expert understanding of cryptography and the concepts involved.
Signatures
Notably, as the yescrypt CHANGES file on the OpenWall GitHub states about the Changes made between 0.8.1 (2015/10/25) and 1.0.0 (2018/03/09), yescrypt has two... | What does j9T mean in yescrypt (from /etc/shadow)? |
1,413,031,625,000 |
There are a number of existing guides online that already cover how to reencrypt a disk, such as maxschelpzig's response here and the documentation in the Arch wiki. However, the Arch wiki focuses more on systems that use mkinitcpio as opposed to dracut, and the existing StackExchange answer assumes an ext4 filesystem... |
This assumes a default Fedora installation, with the following Btrfs-based partitions:
Root partition (Btrfs subvolumes "root" [mounted at /] and "home" [mounted at /home])
Boot partition (mounted at /boot)
EFI partition (UEFI systems only, mounted at /boot/efi)
Requirements
A full-disk backup
cryptsetup (should be... | How to encrypt an existing disk on Fedora without formatting? |
1,413,031,625,000 |
I was wondering, if it was possible to use LUKS encryption with tape drives, QIC for instance.
I'm using LUKS for USB drives and internal disks, even DVDs and CDROMs. But I was thinking of maybe using it to encrypt tape drives as well.
Should I just use cryptsetup luksFormat directly to the tape drive and then enable ... |
You are unlikely to be happy with the huge latencies introduced by LUKS on linear media. A better idea is to pipe the output of tar through OpenSSL, encrypting it with a streaming cipher, before sending it to the tape device.
| LUKS encryption for tape media? |
1,413,031,625,000 |
I have an encrypted share folder on my synology NAS DS413 (which uses ecryptfs). I can manually mount the encrypted folder and read the decrypted files without issue, using synologies GUI. For some reason, I have never been able to mount the encrypted folder using my passphrase . But I can always do it by using the ... |
Short answer: Use the passphrase $1$5YN01o9y to reveal your actual passphrase from the keyfile with ecryptfs-unwrap-passphrase (the backslashes escape the $ letters):
printf "%s" "\$1\$5YN01o9y" | ecryptfs-unwrap-passphrase keyfile.key -
Then use your passphrase with one of the instructions you probably already know,... | how to decrypt ecryptfs file with private key instead of passphrase |
1,413,031,625,000 |
In gpg's man page, there are examples of key IDs :
234567C4
0F34E556E
01347A56A
0xAB123456
234AABBCC34567C4
0F323456784E56EAB
01AB3FED1347A5612
0x234AABBCC34567C4
and fingerprints :
1234343434343434C434343434343434
123434343434343C3434343434343734349A3434
0E12343434343434343434EAB3484343434343434
0xE1234343434343434... |
NOTE: Before I begin, all the representations here are hexidecimal only. There isn't any other representation.
Key IDs
The man page seems pretty clear on where these values are coming from. The key IDs are a portion of the SHA-1 fingerprint.
The key Id of an X.509 certificate are the low 64 bits of its SHA-1 finger... | GnuPG : representations of key IDs and fingerprints |
1,413,031,625,000 |
UPDATE 1:
userone@desktop:~$ sudo umount "/media/userone/New Volume"
umount: /media/userone/New Volume: mountpoint not found
userone@desktop:~$ sudo cryptsetup luksClose /dev/mapper/luks-04cb4ea7-7bba-4202-9056-a65006fe52d7
Device /dev/mapper/luks-04cb4ea7-7bba-4202-9056-a65006fe52d7 is not active.
userone@desktop:~... |
It looks as though the journal has become corrupt, doing some searches over the past few days, this seems to not be uncommon on devices that use LUKS.
You could try running an fsck on the device, acknowledging that any data on the device may not be accessible after - you may like to use dd to make a copy of the drive ... | Mount error when automounting a LUKS-encrypted USB flashdrive |
1,413,031,625,000 |
Is there a way to check if my home folder is encrypted? I believe I checked this option during the installation, but now I'm not sure.
|
Since you didn't specify the distro, I will describe the method for Ubuntu (and maybe its derivatives)
Try looking for folders $HOME/.Private and $HOME/.ecryptfs. Any one or both should be present.
or try ls -A /home this should give an output mentioning either one or both the two folders.
Source: EncryptedHome - Ubu... | Is my home folder encrypted? |
1,413,031,625,000 |
Is there an E-Mail client for linux which allows to search old gpg encrypted mails (i.e. find all mails which contain a particular keyword in the body, including the encrypted ones).
|
Mutt has pretty good PGP integration. The wiki shows what settings you need to add to your .muttrc; these settings may already be present in the system-wide configuration file (for example, on Debian, PGP/gpg works out of the box).
Mutt supports mbox, mh and maildir mailboxes. If you search in a mailbox that happens t... | E-Mail client in linux which allows to search encrypted mail |
1,413,031,625,000 |
On Mac OS X, right now I use the following to back up a small project folder to a USB Flash drive:
alias a='alias'
a dateseq='date "+%Y-%m-%d %H:%M:%S"'
a backup_proj='cp -a ~/code/MyProj "/Volumes/KINGSTON/MyProj `dateseq`"
so each time I type backup_proj, the folder is backed up from the hard drive to the USB drive... |
man zip
From the man page:
-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 t... | On Mac OS X, how to encrypt a small folder and copy that to Google Drive or DropBox? |
1,413,031,625,000 |
The Terrapin Attack on SSH details a "prefix truncation attack targeting the SSH protocol. More precisely, Terrapin breaks the integrity of SSH's secure channel. By carefully adjusting the sequence numbers during the handshake, an attacker can remove an arbitrary amount of messages sent by the client or server at the ... |
This sounds like a big scarry attack, but it's an easy fix. To mitigate the attack, see my Thwarting the Terrapin Attack article for SSH configuration details. Specifically you need to block the ETM HMACs and ChaCha20 cipher as follows:
For recent RHEL-based Linux systems (Alma, Rocky Oracle, etc), this will work:
# ... | How do you mitigate the Terrapin SSH attack? |
1,413,031,625,000 |
I'm trying to determine if I should re-setup my RAID array due to poor IO performance. First off, the system:
i7 920
4 4TB WD 5400 Green drives
CentOS 6.3 host
Secondly, the disk setup:
/dev/sda2,b2,c2,d2 are individually LUKS encrypted
/dev/mapper/a2,b2,c2,d2 are all part of a software RAID5 /dev/md1
/dev/md1 has ... |
Your layering is suboptimal because putting the raid 5 on top of the encryption means that you increase the number of encrypt/decrypt operations by 25 % - since 4 * 4 TB are encrypted.
When putting the encryption on top of the raid 5 only 3 * 4 TB are encrypted.
The reasoning behind that is: you don't have to encrypt ... | Poor IO due to LUKS/Software RAID/LVM ordering? |
1,413,031,625,000 |
I'm surprised that this question is not asked more frequently, but (in RHEL) does LUKS support TPM's the way that Windows BitLocker does? If so, how is this feature implemented, and does it provide the same type of protections that BitLocker for Windows provides?
BitLocker is very popular among businesses, and now th... |
I've implemented support for storing your LUKS key in TPM NVRAM, and RHEL6 happens to be the one platform where all features are fully tested, see this post:
[1] https://security.stackexchange.com/a/24660/16522
| RHEL6 LUKS with TPM support? |
1,413,031,625,000 |
Scenario: I want to connect from Client A to Client B using SSH/SFTP. I can not open ports on either client. To solve this issue, I got a cheap VPS to use as a relay server.
On Client B I connect to the VPS with remote port forwarding as followed:
ssh -4 -N -f -R 18822:localhost:22 <user>@<vps-ip>
On the VPS I've set... |
What you did
You used three ssh commands:
While inside a B console you did:
ssh -4 -N -f -R 18822:localhost:22 <user>@<vps>
Command sshd (the server) to open port 18822, a remote port vps:18822 connected to localhost (B) port 22.
While at a vps console you did:
ssh -g -f -N -L 0.0.0.0:18888:localhost:18822 <user>@lo... | How safe is SSH when used for tunneling? |
1,413,031,625,000 |
On Debian 12.04 LTS
I am trying to access the key net.ipv4.conf.all.mc_forwarding by doing :
sudo sysctl -w net.ipv4.conf.all.mc_forwarding=1
But every time I am doing this, I get the message
error: permission denied on key 'net.ipv4.conf.all.mc_forwarding'
Why do I get this message? How can I change this key?
|
I believe this thread (EDIT: link to bit-coin miner site removed) describes your problem
In a nutshell, the proc entry containing that value is read-only, and cannot be made writable easily:
$ ls -ln /proc/sys/net/ipv4/conf/all/mc_forwarding
-r--r--r-- 1 0 0 0 Jun 17 08:20 /proc/sys/net/ipv4/conf/all/mc_forwarding
$ ... | net.ipv4.conf.all.mc_forwarding: why is my access denied? |
1,413,031,625,000 |
I made a mistake of encrypting the entire LVM physical volume (contains both home, root, and swap) when installing a CentOS 6.4 (2.6.32-358.6.1.el6.x86_64) box. I soon came to realize that moving files takes a horrendous amount of time due to kcryptd running at 90% of CPU and that encryption was not really necessary a... |
That is possible. It requires
another Linux to boot (CD/DVD is OK)
some spare space outside the PV (100M would be good)
a certain amount of fearlessness...
Then you copy a block from the encrypted volume to the area outside the PV and (after success) to the unencrypted base device. After that you increase a counter ... | What's the easiest way to decrypt a disk partition? |
1,413,031,625,000 |
I've got a simple encrypted file with a bit of text inside. It's encrypted with des3 and I know the key. However, I can't for the life of me get it to decrypt in my kali VM. It works fine in a LInux Mint VM however. I'm at my wits end here.... What am I doing wrong?
Here's the working decryption:
user@user-virtual-mac... |
The default hash used by openssl enc for password-based key derivation changed in 1.1.0 to SHA256 versus MD5 in lower versions. This produces a different key from the same password (and salt if used as it usually is), and trying to encrypt and decrypt with different keys produces garbage, an error, or both.
To fix th... | Why can one box decrypt a file with openssl, but another one can't? |
1,413,031,625,000 |
I want to create a script that would automatically encrypt and push to GitHub into public repo some sensible files I don't want to expose (but do want to keep together with the whole project).
As a solution I decided to encrypt them with GPG. The issue is that I can't find any clues on how to encrypt a particular fil... |
Use one of the --passphrase-... options, in batch mode:
--passphrase-fd reads the passphrase from the given file descriptor
echo mysuperpassphrase | gpg --batch -c --passphrase-fd 0 file
--passphrase-file reads the passphrase from the given file
echo mysuperpassphrase > passphrase
gpg --batch -c --passphrase-... | Encrypt with GPG using a key passed as CLI argument |
1,413,031,625,000 |
Setup: I'm using a raspberry pi with a USB HDD, running arch linux and syncthing for my own "cloud" sync.
Problem: In case of a physical break-in where the HDD pi and HDD is stolen, I'd like to ensure that the files on the HDD remain confidential.
Current, high level idea: Encrypt HDD, store key on webserver. On boot,... |
The easiest way to set this up would be to have a cleartext system partition (on the SD card, I presume) and an encrypted data partition. Use dmcrypt to encrypt the data partition, with a key stored in a key file that's downloaded from the server.
First set up the server infrastructure, then download the key file and ... | How to not store hdd encryption key on machine, but still mount on boot? |
1,413,031,625,000 |
When generating private/public keys with ssh-keygen what types of keys will it generate if I wont pass -t option followed with the encryption type like rsa?
|
From the man page:
ssh-keygen can create RSA keys for use by SSH protocol version 1 and DSA, ECDSA or RSA keys for use by SSH protocol version 2. The type of key to be generated is specified with the -t option. If invoked without any arguments, ssh-keygen will generate an RSA key for use in SSH protocol 2 connection... | What is the default encryption type of the ssh-keygen? |
1,413,031,625,000 |
Trying to run this:
gpg -c --passphrase-file secret somefiletoencrypt
But it still asks for a password.
How do we make gpg use the password in the secret to do symmetric encryption?
|
From the gpg manual (man gpg2 on my system), in the section talking about the --passphrase-file option:
Note that since Version 2.0 this passphrase is only used if the
option --batch has also been given. Since Version 2.1 the
--pinentry-mode also needs to be set to loopback.
Testing for myself with GnuPG 2.2.12,... | gpg asks for password when supplying it in a file? |
1,413,031,625,000 |
When unlocking a newly-formatted LUKS volume, I received a warning in the kernel log:
kernel: device-mapper: table: 253:14: adding target device sdk1 caused an alignment inconsistency: physical_block_size=4096, logical_block_size=512, alignment_offset=0, start=33553920
According to another question, a false warning ... |
It appears that dmsetup computes its alignment from the optimal I/O size, without bothering to check that that is actually a multiple of the physical block size. As mentioned in the false warning question, this optimal I/O size makes sense due to USB constraints.
So the solution is simple: use --align-payload to overr... | dmsetup luksFormat creating an alignment inconsistency |
1,413,031,625,000 |
How can I encrypt/hide my - wpa-psk "password" - line in the /etc/network/interfaces file? Since it's uncovered and readable for everyone who can get in the file now.
Or is it better that I use something else if I don't want to store my blank wifi password in a file?
I'm running on debian without desktop environment.
|
The best you can do is hash the password. Set wpa-psk to the output of:
wpa_passphrase <SSID> <KEY>
This will obfuscate the password, but it will not prevent someone else from using the hash to connect with another device.
As an additional measure you should also set /etc/network/interfaces file permission to rw-----... | How to encrypt/hide password in /etc/network/interfaces file on debian? |
1,413,031,625,000 |
I have a process which I would like to have access to an encrypted file system. This is very easy to do with EncFS, but this requires a user mounting the encrypted file system, therefore giving any user who has access to the mounting user access to the data, e.g. root.
Is it possible to have the process mount the file... |
What Gilles said is correct, you can't prevent root from accessing the mount. It may not be able to access the mount directly (without the fuse allow_other option), but it can always switch to that user.
However, what you can do is lazy unmount the mount after the process has changed it's current working directory int... | Use EncFS to encrypt files so that a particular user or process can access them, but root cannot |
1,413,031,625,000 |
I have multiple keys (some private, some public) and I want to get information about them (their length, their type, anything else). Is that possible?
|
Based on the question tags, I’m assuming you’re asking about SSH keys.
For public keys, you can ask ssh-keygen:
ssh-keygen -lf /path/to/key.pub
This will show you the key type (at the end of the output), its length (at the beginning), and its fingerprint.
For private keys, you can ask openssl, but you’ll need to know... | Read key properties |
1,413,031,625,000 |
For my home network I wanted to buy a NAS which supports disk encryption and NFS since it is important for me that the backup is encrypted but also that it preserves owner, groups and permissions (therefore NFS). This way I thought I could use something like rsnapshot or rBackup to backup my data and get multiple snap... |
You can use EncFS on top of NFS
encfs /encrypted_place_at_nfs /mnt/place_to_access_it_unencrypted
| Best way to make encrypted backups while preserving permissions to a windows file system |
1,413,031,625,000 |
Emacs encrypts/decrypts .gpg files automatically. But recently I have lost the ability to decrypt files encrypted by the Linux gpg tool and vice versa.
I use:
passphrase symmetric encryption
gnupg 1.4.11
emacs 24.0.92.1
Debian sid
Decrypting using gpg (encrypted by emacs) gives:
gpg: decryption failed: bad key
Dec... |
The issue was in this (in Russian) solution which manipulates with input method. At present time it affects on passphrase during encryption/decryption.
| Emacs auto encryption and gpg |
1,413,031,625,000 |
I want to be able to route a portion of my traffic through another machine over SSH. For example, is it possible to browse the web through the ssh tunnel and also browse the web through your LAN connection without much effort? (i.e. I want a seamless transition from using tunnel to using LAN)
Thus it is not a simple ... |
I don't know if that's what you're looking for, but you can use ssh -D4545 domain.com to open a socks proxy tunnel at port 4545 to the desired machine from your computer.
You can then set up that proxy in your application (say Firefox) and use a plugin to quickly engage and disengage the proxy settings (something like... | Tunnel traffic through another machine over ssh |
1,468,835,896,000 |
Assume I want to create a large encrypted drive stored in a file using cryptsetup, the first step is to create a random file, assume this should be of size 3T:
dd if=/dev/urandom of=$FILE bs=1G count=3000
the above process can take really long time. I was wondering if the following short-cut makes any sense (from a s... |
/dev/urandom is way too slow for this amount of data.
If pseudorandom is good enough:
shred -v -n 1 /kill/me
If encrypted random is good enough:
cryptsetup open --type=plain /kill/me cryptkillme
shred -v -n 1 /dev/mapper/cryptkillme
cryptsetup close cryptkillme
Encryption is slow too but still order of magnitude fas... | Creating a large file with random content: short-cut by copying? |
1,468,835,896,000 |
When I installed Ubuntu 11.04 and I was offered the option of enabling "encrypted LVM" for my hard drive. After choosing that option, I am prompted for my password during boot to decrypt the LVM.
Now, I am thinking about cancell/uninstall/remove "encrypted LVM' function as I don't want to input the "encrypted LVM" pas... |
There is no simple "remove encryption" command that will preserve your data.
The Arch Wiki explains how to remove encryption and basically it describes the process of data backup, remove encryption, format fs, restore data.
If you entered a long key, and you're tired of typing it every time you login, you could add a ... | Uninstall the Encrypted LVM function to remove the prompted password entry during Ubuntu Boot |
1,468,835,896,000 |
I've upgraded my linux installation to kernel 2.6.38-2 (Debian testing). With the new kernel, loop-aes does not compile, so I cannot mount my encrypted volumes. I heared that it is possible to use some compatibility mode of cryptsetup to mount encrypted volumes of loop-aes, so my question is:
How can I do that?
I have... |
cryptsetup loopaesOpen <device> <name> [--key-size 128] --key-file <key-file>, according to http://code.google.com/p/cryptsetup/wiki/Cryptsetup130. If your cryptsetup isn't 1.3.0, you're gonna have to download that version and compile it.
cryptsetup opens the volume and creates a new block device in /dev/mapper/<name... | Migration from loop-aes to cryptsetup |
1,468,835,896,000 |
I have a gpg setup started with older gpg versions and I did not use a passphrase back then. I would type enter directly when prompted for it. I'm not sure if that means the key isn't encrypted or if it is encrypted with an empty passphrase.
Regardless, when I try to decrypt something that was sent to me recently, gpg... |
I solved this by using an older system which had the key.
I set a new passphrase on the old system where empty-passphrase input works.
Export old system private key and copy it over new system
Clean gpg state of new system (move .gnupg to .gnupg.bak)
Import the non-empty passphrase private key
Here are the commands... | gpg cannot unlock passphrase-less key: "gpg: public key decryption failed: No passphrase given" |
1,468,835,896,000 |
I'm curious if there is a filesystem that's unencrypted, making it readable by anyone, but employs a digital signature scheme so as to require that writes be digitally signed.
I suspect the answer is "No because it'd be complicated and probably slower than simply encrypting the drive" but seemed interesting.
|
The two obvious candidates would be ZFS and Btrfs, but as far as I know, they don't do this. Btrfs currently has no crypto at all (for encryption, you're supposed to use LUKS, which provides encryption and optionally block-level integrity but not global integrity). ZFS has an integrity mode where it uses a tree of cry... | Is there an unencrypted but signed filesystems? |
1,468,835,896,000 |
I have a single text file I want to encrypt.
I can easily do so with any common software. But then, I want to be able to click on it, provide a password, and be able to read, edit, and close it. All from the GUI, which should be KDE-compatible, and possibly the editor should be Kate. Ideally, this should be available ... |
For just one file at a time, or the very occasional file, I think a whole encrypted drive or home with EncFS/eCryptFS/dm-crypt/LUKS would be overkill (but would work excellent in case of theft).
A solution using a bash function to decrypt, edit, re-encrypt sounds more like what you're looking for. Using gpg since it'... | Encrypt a single file and read/edit on-the-fly |
1,468,835,896,000 |
Here's the scenario, we're using GnuPG to encrypt data between 2 web servers. 1 is on RHEL. GnuPG will be accessed through cgi scripts to encrypt and decrypt. So I need a keyring that the apache user has access to. This has proven to be difficult for me on Red Hat, I was able to get this set up pretty easily on Ubuntu... |
Have you tried creating a new user and invoking the command with sudo instead? If fear this might be some permission issue and the easier way would be removing the agent node from /var/www to somewhere we know is accessible to the gpg user, maybe the /tmp directory. You can manually specify the agent node location cha... | Creating a GnuPG keyring for apache |
1,468,835,896,000 |
I want to encrypt the content of a directory in a container with an ext4 filesystem using cryptsetup. The size of the container should be as small as possible and as big as necessary, because I only want to write once and then backup.
First try: setting the size of the container to the size of the content.
dirsize=$(d... |
LUKS by default uses 2 MiB for its header, mainly due to data alignment reasons. You can check this with cryptsetup luksDump (Payload offset: in sectors). If you don't care about alignment, you can use the --align-payload=1 option.
As for ext4, it's complicated. Its overhead depends on the filesystem size, inode size,... | How much storage overhead comes along with cryptsetup and ext4? |
1,468,835,896,000 |
I have a problem booting my Debian Linux server. After a system update, GRUB loads the initrd and the system should ask for the password, but it doesn't. Instead, I get dropped to BusyBox. After trying to mount the encrypted volume manually with cryptsetup luksOpen, I get this error:
device-mapper: table: 254:0: crypt... |
Your kernel lacks support for aes-cbc-essiv:sha256. “Error allocating crypto tfm” refers to the kernel's cryptographic subsystem: some necessary cryptographic data structure couldn't be initialized. Your support for cryptographic algorithms comes in modules, and you have a module for the AES algorithm and a module for... | Booting encrypted root partion fails after system update |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.