date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,479,187,367,000
As part of my job I often find myself transferring lots of files between my computer and a remote storage space accessible over SFTP. To ensure the files' correct transfer I compute their SHA256 hashes prior to transferring them, transfer them, then verify these hashes on my computer. However, this can be very lengthy...
SSH establishes a secure channel between the client and the server. This means that any corruption of the file (accidental or malicious) will be detected. You do not need to do anything special! The only thing you need to do is to check that the return value of the scp or sftp command is 0, indicating success. If scp ...
Can using SFTP with HMAC-RIPEMD160 replace computing file hashes before and after transferring?
1,479,187,367,000
I am trying to verify this hashed password from my /etc/shadow file: $y$j9T$eia4V8bEUD9QBJAEwilXU.$TLUJexdhrx/q3Nc/YaCrlkVkrxUkimYn3o432pxFr90 I would like to pass the hash to mkpasswd this way but it fails: $ mkpasswd -m yescrypt secret eia4V8bEUD9QBJAEwilXU. Wrong salt length: 22 bytes when 0 expected. $ mkpasswd -...
If you pass the salt (eg with -S or as the second param) and include the $ settings then you don't need to specify the method % mkpasswd -S '$y$j9T$eia4V8bEUD9QBJAEwilXU.' secret $y$j9T$eia4V8bEUD9QBJAEwilXU.$TLUJexdhrx/q3Nc/YaCrlkVkrxUkimYn3o432pxFr90 % mkpasswd secret '$y$j9T$eia4V8bEUD9QBJAEwilXU.' $y$j9T$e...
How to pass a salt to mkpasswd with yescrypt algorithm
1,479,187,367,000
There are many tips on how to resize (increase) a LUKS2 encrypted device / partition / LVM volume. But how to increase the size of the LUKS container created in the file? I once created: dd if=/dev/random of=/some file bs=1M count=100 cryptsetup luksFormat /some-file cryptsetup luksOpen /some-file some-mount mkfs.ext4...
You can just set a new file size with truncate, then cryptsetup resize and resize2fs. For example, setting it to 200M: truncate -s 200M cryptfile.img Alternatively, if you prefer dd or other tools, you can just append another 100M of random data: head -c 100M /dev/urandom >> cryptfile.img Warning: if you truncate to...
How to increase the size of a LUKS file-container
1,479,187,367,000
I have the following partition table: NAME nvme0n1 ├─nvme0n1p1 part /boot └─nvme0n1p2 part └─crypt crypt ├─crypt-swap lvm [SWAP] ├─crypt-root lvm / └─crypt-home lvm /home As the drive is an SSD, I would like to perform TRIM comma...
It turned out, LUK2 can permanently store metadata in the header. It is possible to enable allow-discards and store in the partition itself (without any further configuration -e.g., kernel parameters) with the command: cryptsetup --allow-discards --persistent refresh root Evidently, I issued this command in the past ...
Disable allow-discards on encrypted partition
1,479,187,367,000
Pardon me if this is not possible. My goal is to utilise pass. From the conducted research, it appears that the pass command utility will require a GPG key before you can store your sensitive data. Now, in order to generate a GPG key, one would run the following command gpg --full-generate-key which is a pre-requisit...
What you are trying to do is unfortunately not possible. AES256 is a symmetric-key algorithm, i.e. the same key is used for encrypting and decrypting. The --generate-key or --full-generate-key option of gpg is used to create an asymmetric public/private key pair, where the public key is used for encryption and the pr...
How to specify AES-256 algorithm when creating GPG key?
1,479,187,367,000
This sounds very dumb but hear me out (though it still may be). I'm a CS student. And the collage I study in have the bright idea of blocking all incommoding SSH and VPN traffic in the name of security. Then asks all persional to go through an out-of-date and exploitable OpenVPN server to reach behind the firewall. Wh...
socat should do. The socat tool takes care of all your needs to (bidirectionally) pipe anything anywhere. It just takes a pair of arguments, each specifying one of the things to connect together. The most interesting options in this case are TCP:host:port, TCP-LISTEN:port and FD: or OPEN:. Each argument can also be co...
Apply rot13 (or other encryption) to all forwarded traffic on port
1,479,187,367,000
When I run iw phy I see the list of ciphers my interface supports, Supported Ciphers: * WEP40 (00-0f-ac:1) * WEP104 (00-0f-ac:5) * TKIP (00-0f-ac:2) * CCMP-128 (00-0f-ac:4) * GCMP-128 (00-0f-ac:8) * GCMP-256 (00-0f-ac:9) * CMAC (00-0f-ac:6) * GMAC-128 (00-0f-ac:11) * GMAC-256 (00-0f...
Try to run wpa_cli (or sudo wpa_cli). Then type: scan scan_result scan_result should print what kind of encryption wifi networks in your vicinity use. You know to which one you are connected, so that is your used encryption method. You can know something even before that as you know that CCMP and GCMP are used in WPA...
How can I get the active cipher for a wireless interface?
1,479,187,367,000
Say I encrypt a file using my private GPG key on my desktop. I then transfer the file to my laptop, and intend to decrypt it. What do I do? I heard something about "exporting a public key", what does this mean? Do I use the private key on my laptop as well? If I do, how do I put the private key from my desktop onto my...
Encryption is done with the public key. Decryption with the private key. Keys can bei exported to files and imported on another machine. It's possible to upload the public key to a keyserver. listing keys (find your id after "/") gpg --list-keys export private key (replace 12345ABCD with your id) gpg --export-secret-...
Using GPG keys on multiple devices?
1,479,187,367,000
I have set up an encrypted swap partition following this guide. My /etc/crypttab is set up like this (note the discard option on swap): rootfs UUID=<UUID_root> none luks,discard swap UUID=<UUID_swap> /dev/urandom swap,offset=2048,cipher=aes-xts-plain64,size=512,discard I also have allow_discards=1 in /etc/lvm/lvm.con...
So apparently because swap is not considered as a normal filesystem, it will not be trimmed when fstrim is run manually. But it appears that the Linux kernel does the trimming for the swap when it is mounted automatically when the underlying device supports the operation. This is referenced in the Fedora project docs:...
fstrim does not trim swap
1,479,187,367,000
I'm writing a bash script with the following snippet: #!/bin/bash # usage '$bash this-script.sh in.pdf out.pdf' stty -echo printf "Password: " read password stty echo echo pdfencrypt "$1" -p "$password" -o "$2" on characters like § ä ö ü it fails with the following message: incompatible character encodings:...
It seems that pdfencrypt requires an 8bit (ISO-8859) encoded password and does not know how to deal with (i.e. convert) UTF-8 passwords. You must use a compatible character encoding when executing pdfencrypt, for encryption and decryption. Plain ASCII ("C") or ISO-8859-n (like "de_DE.latin1" as suggested by Hauke Lagi...
Bash script using pdfencrypt fails on certain characters
1,479,187,367,000
I have 2G RAM and 4G swap file. also I have encrypted storage for files. when I boot up my machine there are 100-120M RAM used so plenty of RAM available and swap won't be used (I guess?). If I unlock my storage and later heavily use RAM so I will need my swap file, is it possible that encryption keys will be moved th...
It depends on the way that encryption and key storage is done, but you should assume the answer is yes. Stuff are written to the swap space is essentially the data space of user programs. Anything in the linux kernel is going to stay in memory (as you have specified no hibernation), so once information is passed down ...
does non-encrypted swap ever store encryption keys?
1,479,187,367,000
in an attempt to access a truecrypt container, I stumbled about the prerequisite of setting up a loop device... ncoghlan suggested in an earlier answer When you run it as root, losetup -f will automatically create loop devices as needed if there aren't any free ones available. So rather than doing it yourself with ...
Serge's comment made me do my homework - study the man page in more depth than before. The solution was simply to enter in the shell losetup (without any arguments). Then, afterwards, losetup -f resulted, successfully, in /dev/loop0
how to add a loop device on fedora 23 with losetup?
1,479,187,367,000
I am trying to read a data matrix which I have generated from a private 2096-bit encrypted RSA key. The key was generated using gpg and printed to PDF with the following command: gpg --export-secret-key MY_PRIVATE_KEY_ID | paperkey --output-type raw | dmtxwrite -e 8 -f PDF > ~/key.pdf I then printed key.pdf and scanne...
Looks like, I managed to get data from your image. I did the following: Open with GIMP Colors -> Threshold Position the slider around center (I don't remember exact value I chose) and click OK Image -> Canvas Size Choose percents Canvas Size: Width: 160 % Canvas Size: Height: 120 % Offset: click on "Center" Click Res...
How do I use dmtxread to read a scanned data matrix?
1,479,187,367,000
I can't find a free/open-source software that password protects my PDFs with AES 256. pdftk just offers 128-bit strength.. In fact I didn't find any other tool that encrypts PDFs. What tool may I use to password protect my PDFs, using AES 256
QPDF says it supports 256bit encryption in it's massive manual. I didn't read it all and have never tried it. It looks like it's worth a shot. http://qpdf.sourceforge.net/
Password protect a PDF file with AES 256
1,479,187,367,000
I have Gentoo Linux installed on a 25.93GB/62.43GB partition /dev/sda4. The other partitions on the disk are 150MB /boot on /dev/sda1 and 56,66GB unused space on other two partitions. I am planning to encrypt the unused space with dm-crypt, format it to ext4 and after migrating my installation onto it, to nuke the old...
1.- Yes it is possible but you will have to do some tweaking. 2.- You can't encrypt the whole disk, at least boot partition must be unencrypted if you want your system to start (someone has to ask for the decryption password -initrd- and you need it unencrypted). 3.- encfs has some flaws, you can read about them here....
Cloning a root partition onto a dm-crypt encrypted one
1,479,187,367,000
I tried everything I was able to find online. Hours of research since yesterday ;( I found no one struggling with the errors I'm facing, except from GitLab (error code -1 instead of -4 I'm getting), Reddit or this mailing list from 2006. I might give unnecessary details, sorry! I have this 5 TB WD drive where I alread...
This is a problem with the device size of your partition. Your partition is an odd number of 512-byte sectors large (9767473119 sectors as shown by fdisk). Your LUKS header is set to use 4096-byte sectors (sector: 4096 [bytes] shown by cryptsetup luksDump). So that leaves 7 sectors on the partition that can not be use...
(Probably) Corrupted LUKS Header, Restoring Header does not work
1,479,187,367,000
How can i encrypt a Linux internal disk, so that it is only accessible with a unique system (preinstalled Debian bullseye), installed on a USB drive? Even if someone has the encryption passphrase and physical access, without the USB drive holding the other system he shouldn't be able to access it. Is there a way to do...
only to an unique system (preinstalled Debian bullseye) installed on the USB drive even if someone have the encryption passphrase Nope. In cryptography, safety of encryption is always provided by the secrecy of the key, never by not giving someone the decryption software. And in the end, that's what you demand: only...
Encrypt main data Linux partition so it's only accessed by unique system
1,479,187,367,000
I had a LUKS partition for which cryptsetup luksDump /dev/mydisk gave (excerpt) Digests: 0: pbkdf2 Hash: sha256 Iterations: 176646 Salt: xx xx ... ... Running cryptsetup reencrypt /dev/mydisk while the container was offline removed the previous digest after it was done (understandably), ...
This appears to be a bug in cryptsetup. I've filed a report here: https://gitlab.com/cryptsetup/cryptsetup/-/issues/606.
`cryptsetup reencrypt` seems to cripple digest iteration count
1,479,187,367,000
I already did some research on my question (see below), and it's as good as a 'done deal' but I would still like to put forward my problem to this knowledgeable community. Short version of the issue: in partman (the disk partitioner of the Debian installer) the passphrase of a previously dm-crypt/LUKS encrypted volume...
There is no way to recover whatsoever. (*) With LUKS, the passphrase you use to open the encryption, and the master key actually used for the encryption, are completely unrelated to one another. Basically your passphrase decrypts a completely random key, and this random key is stored in the LUKS header. Losing the LUK...
The password of previously encrypted volume got changed by the Debian installer
1,479,187,367,000
I want accomplish the following task: On a Ubuntu System with multiple Users accounts and encrypted Home directorys a NFS share should be mounted after login. I want to use systemd user service for this, but can't get it fully working. What's working so far: - manual mount with user rights, configured with sudo - en...
It's a bug in the ecryptfs package configuration. You can use a quick fix: Open /etc/pam.d/common-session and switch the lines session optional pam_systemd.so session optional pam_ecryptfs.so unwrap to session optional pam_ecryptfs.so unwrap session optional pam_systemd.so so that pam_sy...
Use Systemd user services with ecryptfs
1,479,187,367,000
I've recently upgraded our server from CentOS 6 to CentOS 7 and I am having issues getting pdf encryption working on it. On CentOS 6 I installed libgcj and then the pdftk package. I could then encrypt pdfs using /usr/sbin/pdftk pdfName.pdf output pdfEncrypted.pdf owner_pw 123456 user_pw 123654 I know I cannot i...
First Alternative: use qpdf. It's on CentOS 7 base system. # yum install qpdf $ qpdf --encrypt user-password owner-password 40 -- file1.pdf file2.pdf This will take file1.pdf as input, assign user and owner passwords, a key length of 40(valid values are 40, 128, or 256) and export the encrypted data to file2.pdf To "...
CentOS 7 Encrypt a PDF
1,479,187,367,000
Is it possible to encrypt pictures and other files like audio etc with GPG? If yes then how to? If not then why not?.
Yes this is possible. gpg normally handles files as binary and you don't have to do anything special to encrypt pictures or audio. gpg -c yourfile.mp3 for symmetric encryption and gpg -e yourfile.mp3 to encrypt with your (pregenerated) private key.
Encrypt multimedia files with GPG
1,479,187,367,000
For one of my apps I need to enable FIPS for OpenSSL, while simultaneously using software disk encryption. VM #1 I launched a CentOS VM instance which was software encrypted during install. The system booted fine (after entering the boot decryption password). Next, I went through the steps to enable FIPS-OpenSSL a...
The problem was that I encrypted the volumes before enabling FIPS. As garethTheRed alluded to in a comment, LUKS used a non FIPS approved algorithm, so when FIPS was enabled things went bonkers. The solution is to Enable FIPS Encrypt volumes In that order. This guide was also useful in solving the problem. It i...
Enabling FIPS on a luks encrypted CentOS system breaks boot password
1,479,187,367,000
I have configured an OpenVPN install. Mode: multiclients 1server. Clients are raspberries. I note how easy it is to steal a rasp, and look in HDD to get key+cert+conf. Copy it on your laptop, and connect the VPN... I'm nooby on it, what would the good way to protect from such a case ? Disk encrypt ? Thank you.
With very few exceptions, if somebody has your hardware in their hands, they can duplicate everything, simply by accessing and copying the whole storage. There's no extra encryption that would help. If you encrypt the disk, the disk encryption key has to be readable somewhere. Disk encryption is useless in your scenar...
OpenVPN : protect your clients key/cert/conf from being stolen?
1,479,187,367,000
I'm learning about encryption and decryption on linux and php. So I have three questions about openssl and how it generates password hashes. 1- So say I generated a password with the linux command openssl passwd My first observation is that every time I generate a hash, it's different! Why is that? Is it because of ...
openssl crypt you password with an algorithm and a salt. If you do not provided a salt an random is choosen. the salt is given in the resulting hash. for instance openssl passwd -1 foo $1$pyuddMjp$3.deTnHdrVVVLoh5zkQ0B. where 1 is proticol (md5 here) pyuddMjp is salt If I want to verif you know passwd (i.e. foo)...
How does openssl decrypt a password
1,479,187,367,000
How can I automount an EncFS unit at login/start my session? I use Fedora 20 and KDE. Please don't mention apps like Cryptkeeper and so. I would rather console solutions.
You can use pam_mount. Read step 5 in this mini tutorial that walks you through it. Please note that there is a security issue with this.
Automount EncFS unit
1,479,187,367,000
I need encrypt whole disk on Debian 7.5, (it will be work as server) but I need enter encryption password via SSH. So I need encrypt whole disk except primary system features as ssh server, because for example I need remotely restart this server. Do you know about any effective options?
First step would be to decide what needs to be encrypted and what not. There is no need to encrypt a standard debian server release, its not like it contains any secrets. Create at least two partitions, one for the normal stuff and one for the sensitive stuff. Then you install the complete server as normal, without a...
Encrypt my disk but allowing to enter the password with SSH
1,479,187,367,000
I have about twenty files symmetrically encrypted with CAST5. I have a single passphrase that is meant to work with all of the files and I wish to confirm that it does. I wrote a script to perform a check a check on each file. read pass for file in *.gpg ; do if ! gpg --batch --passphrase "$pass" -d "$file" &>/dev/...
Unfortunately there is no way of asking gpg-agent whether a key is passphrase protected. But you need not check the files but each key once only. Thus you should first check which keys are involved. There is no need to check the same key twice (by using it to decrypt two files). I have to admit that though I consider ...
Checking if a passphrase is able to decrypt symmetrically encrypted files
1,479,187,367,000
I have a T61 with C2D T7300 CPU/4 GByte RAM. I has SL 6.3 on it, and I ticked the encrypt VG during install. If I start a "normal" windows xp on it, its ~slow.. so.. I need a little performance boost :) Loud thinking/QUESTION: kcryptd could take ~20% (!) of CPU, but encryption is needed.. soo I was thinking that how c...
There are three main storage encryption possibilities under Linux. Ordered from lowest level to highest level, from fastest to slowest, from least flexible to most flexible: Dm-crypt to encrypt a whole filesystem (or more generally any storage device). You get the best performance, but you have to decide to use it wh...
Fast encryption for home directory with Scientific Linux (ala' RedHat)
1,332,339,921,000
Suppose Bob got a message from Alice encrypted with his public key and signed with her private key. Now he wants to prove to Charlie that he got a message from her with this exact content. The message was created via gpg --sign --encrypt. My idea was that he could decrypt the message and save it with its signature som...
This was pretty hard to find. It is not in local man gpg. The command: gpg -vi --unwrap msg1.gpg (-v means verbose, -i is interactive, does not overwrite files.) Caveat: You might(?) need to decompress the output sometimes. Documentation: https://gnupg.org/documentation/manuals/gnupg.pdf --unwrap This command is...
Convert encrypted and signed to just signed PGP message
1,332,339,921,000
I need to encrypt some data using aes-256-ecb since a backend code expects it as a configuration. I'm able to encrypt using a key which is derived from a passphrase using: openssl enc -p -aes-256-ecb -nosalt -pbkdf2 -base64 -in data-plain.txt -out data-encrypted.txt | sed 's/key=//g' This encrypts using derived key a...
You have to specify the key in hex using -K. Note that you also need to specify the IV with -iv for some ciphers and modes of operation. You will also need to add -nopad for ECB decryption if you are decrypting a raw AES block (i.e. no padding is used). Be aware that ECB is highly insecure if used to encrypt more than...
openssl encrypt by specifying AES 256 key instead of passphrase
1,332,339,921,000
I can encrypt my /dev/sdb4 with cryptsetup this way sudo apt-get install cryptsetup sudo umount /dev/sdb4 sudo cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb4 sudo cryptsetup luksOpen /dev/sdb4 sec sudo mkfs.ext3 /dev/mapper/sec sudo mount /dev/mapper/sec /mnt People can't get the content in /dev/sd...
You can do this with a udev rule. e.g. I use the following file (/etc/udev/rules.d/95-hide-block-devices.rules) to hide my mdadm devices and ZFS zvols from various GUI file selector dialogs: KERNEL=="[mz]d*", ENV{UDISKS_IGNORE}="1", ENV{UDISKS_PRESENTATION_HIDE}="1" I only have one mdadm device these days (for /boot...
How can hide the encrypted partition in gui?
1,332,339,921,000
Are there any backup/cloning/recovery tools that can pull files from LUKS-encrypted disks while dropping free blocks? Something that runs from within the unlocked system and hot-transfers the files, or maybe runs from a bootable USB flash drive, prompts the encryption key, and unlocks the disk?
The fact that your disk is encrypted is largely irrelevant. Whatever you use will need the encrypted disk to be opened (cryptsetup luksOpen ...) before operation. I'll also draw your attention to e2image which may copy more filesystem meta data. It only works with ext2,3,4 file systems. Besides e2image, your only rea...
Backup tool for pulling files out of encrypted disks?
1,332,339,921,000
I have several drives encrypted with VeraCrypt and I wanted to be able to mount them all to automount when I insert a drive containing their keyfiles. This way I only have to decrypt the flash drive that contains the keyfiles and only type in one password. I created an automation program in Nim to handle this: https:/...
%veracrypt ALL=(ALL:ALL) NOPASSWD: /usr/bin/veracrypt %veramount ALL=(ALL:ALL) NOPASSWD:/home/user/Code/nim/mountkey/veramount Instead of %veracrypt and %veramount, there should be the name of the user, which should have sudo permission to execute the script. Something like this: myusername ALL = (root) NOPASSWD: /pa...
/etc/sudoers rule is not being obeyed
1,332,339,921,000
Let's say I use LUKS for all my system except for /boot and I have my /home/user directory encrypted as well. In the context of the security of my user account (Which is more than less isolated from root) should I create another encrypted container to store my key files for the purpose of quick mounting of encrypted d...
Storing a keyfile in the same location as the encrypted volume is useless. Encryption is only useful if the decryption key is stored separately from the encrypted volume: in your head, on a removable device (USB key, smartcard, …), etc. (There is one way in which encryption is still useful with the key stored in the s...
Where Should I Store Encryption Keyfiles?
1,332,339,921,000
I'm using a NAS (Buffalo LinkStation Pro with SSH access, if that matters) which runs Linux (2.6.31.8 #1 Fri Jun 8 11:07:30 JST 2012 armv5tel GNU/Linux, with smbd --version = Version 3.0.30-1.4.osstech), while all clients run Windows 7. Currently, the shares are on a xfs partition. How can samba be modified such that ...
A Samba share can never behave as a NTFS share, only as a SMB/CIFS share. If you want encryption then you will need to use a per-file/directory tool, or implement it in the server instead.
Which filesystem to use when a samba share should allow for NTFS encryption?
1,332,339,921,000
Using Fedora/Ubuntu, how can I do it?
You need patched kernel, losetup and mount. The package is usually called util-linux, you can get the patches from here. If you don't want to boot from a loop-aes device it's really simple: # Write 65 lines of random data to keyfile.txt This will be used as a key for # the data on the disk and your password will be as...
How can I encrypt a device with loop-aes under Linux?
1,332,339,921,000
Is it possible to create a single-user USB installation (with persistence) of Ubuntu Linux such that the entire USB stick is encrypted and requires a passphrase at boot time? Is there an online tutorial for this?
It should be straightforward to make a persistent installation directly on a USB stick, as if it was an internal disk. Plug in your Ubuntu installation media (I recommend not putting it on the same stick, so that the two are bootable separately), your USB stick, and point the installer to the stick. The server install...
USB Ubuntu with whole-disk encryption
1,332,339,921,000
I was wondering if it's possible to automatically decrypt and mount a ZFS pool and its datasets at boot. Currently, I have to unlock the pool manually by using the command # zfs load-key -a and then run # zfs mount -a. It might also be worth mentioning that the "key", at the moment, is a passphrase (maybe it would be ...
I found out how to do this myself. First of all, after you've loaded the keys using # zfs load-key -L file:///path/to/keyfile <pool>, the key will stay loaded unless you explicitly unload it using # zfs unload-key. In case you want to try to automatically load the key anyway, below'ss a quick systemd service I've wri...
How can I automatically unlock and mount a ZFS pool at boot?
1,332,339,921,000
I apparently messed up today. I have to resize an encrypted root partition to make room for a windows dual boot. I followed instructions from the arch wiki since it seemed to match my needs even though I am using debian. At some point I had to use pvmove because after shrinking the root partition, the free space was b...
Thanks to @frostchutz I got this fixed by using parted to extend /dev/nvme0n1p3 by 2048 sectors.
How can I fix LVM PV size after a botched encrypted partition shrinking
1,332,339,921,000
I am working on encrypting a stream with aespipe to a logfile, and it makes sense to append to the same file every time I run it, so I wanted to do something like my_stream | aespipe -K my_key >> aes_logfile I have already taken into account that aespipe writes out blocks of 512 bytes, and I made sure to pad my strea...
Well, I can reproduce it. # dd count=1 if=/dev/zero | aespipe > aes_zero Password: Error: Password must be at least 20 characters. # dd count=1 if=/dev/zero | aespipe >> aes_zero Password: Error: Password must be at least 20 characters. # cat aes_zero | aespipe -d | hexdump -C Password: Error: Password must be at leas...
concatenating aespipe files: wrong byte every 512 bytes after first file
1,332,339,921,000
This question is about the optional encryption of user data with the live Linux distribution KNOPPIX v6.2 (2009-11-18), which as I understand is based on Debian. I do not use this old version anymore, but I am trying to retrieve years-old data from the persisted data file knoppix-data.aes created by KNOPPIX v6.2 in th...
Well, corruption seems like the only possible explanation (someone did a cp file /dev/loopX or similar). loop aes does not have metadata so the file should be random throughout (perhaps except for sectors that were never written to, i.e. "free space"). You don't want an odd offset, you need to use the original offset ...
Does the presence of cleartext sha1 sums in knoppix-data.aes indicate corruption?
1,332,339,921,000
I'm working on dm-crypt utilizing cryptsetup. I'm interested to understand if it's using a fixed block dimension to encrypt files. I explain it better: I created a LUKS envelop, formatted it with luksFormat, then open and mounted in file system. Then I normally write files in that encrypted folder. I want to understan...
Are you talking about the blocksize used by the cipher? Cryptsetup uses block ciphers, often with a 16 byte blocksize. Changing the cipher might change the blocksize, see /proc/crypto for available ciphers & details, and man cryptsetup. Cryptsetup has a fixed blocksize, 512 bytes, here's a little from it's FAQ: 2.18...
dm-crypt / cryptsetup which block encryption dimension use
1,490,733,977,000
I'd like to build a Debian Live system based on sid with an encrypted root filesystem. It's quite easy to install a Debian system with a rootfs encrypted with dm-crypt/LUKS, so I suppose it's also doable on a live system. In Debian Live 2.x, lh_config used to support an --encryption parameter which would do just that,...
I've sent a patch for version 4.x to the Debian Live developpers as a starting point to implement this.
Debian Live 3.x with encrypted root filesystem
1,490,733,977,000
I'm attempting to remove a number of ciphers from my openSSH installation: ssh -Q cipher 3des-cbc blowfish-cbc cast128-cbc arcfour arcfour128 arcfour256 aes128-cbc aes192-cbc aes256-cbc [email protected] aes128-ctr aes192-ctr aes256-ctr [email protected] [email protected] [email protected] I've attempted to remove, ...
sshd_config only affects the ssh daemon, while you're testing the ssh client, which uses ssh_config.
OS X ignoring sshd_config
1,490,733,977,000
I have a weird ask. I have a tar achive, archive.tar.gz, filled with plaintext files. That archive is then gpg encrypted into archive.tgz.gpg. In total, archive.tgz.gpg is < 100KB. Now, I want to make archive.tgz.gpg look like a linux binary, and have it be un-obfuscated using mostly unix standard utilities. I'm aware...
You can totally embed the payload into a working executable. echo "I am your encrypted message." > message.txt gpg2 --symmetric message.txt ld -r -b binary -o message.o message.txt.gpg gcc -o unsuspicious unsuspicious.c message.o With unsuspicious.c containing any program: #include <stdio.h> int main(int argc, char**...
Make GPG encrypted file look like binary executable
1,490,733,977,000
So I've seen many many posts on how to do the conversion with private key; but does anyone one know how I can do this with just only public key? As I'm trying to convert someone else's public key. Or is this something not possible and I need to ask them to generate one themselves?
If you are just looking to convert a public key, not create a certificate then you only need the public key. ssh-keygen -f id_rsa.pub -e -m pem > id_rsa.pub.pem Will read a public key file id_rsa.pub (containing just your friend's public key) and convert it to pem format. The private key would be needed for something...
Can openssl convert SSH public key to a PEM file without private key?
1,490,733,977,000
I know that I can create a GPG keypair from the CentOS 7 terminal by typing gpg --gen-key and following the resulting steps, but how can I make sure that the resulting public key is self-signed? And how can I send the resulting key via email to a remote computer? I know that I can send an email with an attachment us...
First, find the public key you want to export: gpg --list-public-keys Look at the line marked 'pub'; it displays your public key type and number. For instance: pub 1024D/5000280F 2009-07-10 Use the number to do your export: gpg --armor --export 5000280F > klaatu_pubkey.asc Check to make sure it worked: cat kla...
creating and sending a self-signed public key using GnuPG in CentOS 7
1,490,733,977,000
I'm going to create encrypted lvm on my disk. As a encryption mechanism I choose dmcrypt with LUKS. Here's my question - should I overwrite (for security reasons) whole disk before creating encrypted container, or overwrite already encrypted container (there is some information at cryptsetup FAQ - step 6) or both? Doe...
If you do not overwrite the previous contents of the disk, any old information will remain in a trivially (software-only) readable form until it happens to be overwritten, which may be a very long time (bordering on forever). If you do overwrite the previous contents of the disk with zeroes before creating the LUKS da...
Overwriting disk before encryption
1,490,733,977,000
I am trying to mount a bitlocker encrypted drive with dislocker. Here are the exact commands I ran: sudo dislocker -r -V /dev/sdb7 -u -- /media/bitlocker sudo mount -r -o loop /media/bitlocker/dislocker-file /media/mount After running the last one, I get mount: /media/mount: wrong fs type, bad option, bad superblock ...
I see that you are missing specify the filesystem of your device (this case NTFS). Let's try with this mounting command: sudo mount -t ntfs-3g -r -o loop /media/bitlocker/dislocker-file /media/mount Here are some sample parameters for tag -t: exFAT: exFAT-fuse NTFS: ntfs-3g
Cannot mount dislocker-file loop: wrong fs type, bad option, bad superblock
1,490,733,977,000
If I encrypt (dm crypt, LUKS) my whole system, how many RAM should I provide ? I've understood that LUKS volume is mounted RAM, ... If my system is 10 Gb, should I have something like RAM 12 Go ?
You have misunderstood. The LUKS data is stored on disc and encrypted/decrypted a block at a time as necessary (of course there is some caching going on). I don't know the minimum size, but I operated a 32Gb LUKS encrypted ReiserFS partition from a 1 GB memory PC. A whole disc shouldn't make any difference from using...
LUKS encryption full disk, how many RAM?
1,490,733,977,000
I have to prepare a computer to give away, and I do not know who is going to use it. The computer has Debian installed, and the HDD is entirely encrypted. All users have their storage on the server. I have been believing that if it meet some conditions below this will safe huge works for all computer departments: Any...
It's not really possible. You simply can not prevent someone powering on/off a computer, or indeed them doing whatever they want with it once they have hands on access. I've done something similar, for a server. It uses full disk encryption and produces its key based on hardware data such as CPU type, Mac Address, amo...
Secure the content of a hard disk
1,490,733,977,000
I have a USB flash drive with Full Disk Encryption using LUKS. I plugged in the drive and mounted it as such using the following: cryptsetup luksOpen /dev/sdb flash mount /dev/mapper/flash /mnt/flash If I physically remove my flash drive I can still access it's contents at /mnt/flash. Why is this? I see it as a secur...
If you ran a program / script from the USB itself, you should be able to figure out what LUKS map/name and device it's on (or just tell the script the device or mapped name if you know it) and watch for when the device "disappears" when it's removed. Then unmount it. I'm pretty sure that unplugging a USB will cause th...
LUKS partition still accessible after removing drive physically
1,490,733,977,000
I'm having issues unlocking an encrypted disk over ssh using dropbear. I've followed this guide to set it up, but I just end up getting Permission denied (publickey) error I copied the public key from my machine ~/.ssh/id_rsa.pub to the server /etc/dropbear-initramfs/authorized_keys and updated with update-initramfs -...
During writing the question, I figured it out, and might as well tell anyone else wondering. When using ssh, you need to specify root as the user: ssh [email protected]
dropbear-initramfs Permission denied (publickey)
1,490,733,977,000
I often use gpg command to encrypt files like so gpg -c file which produces a file.gpg. I would like to get rid of the command line aspect and have a right click button in my Nautilus. I tried installing the Seahorse extension for Nautilus but it doesn't work very well and I would like to keep the simplicity of my ab...
As far as I know there are two simple ways to add entries to the Nautilus context menu : Nautilus scripts nautilus-actions package, which, depending on your distribution might be depreciated. I'm running on Debian Bullseye/sid where nautilus-actions is not available so I will present the way using Nautilus script. T...
GPG encryption in Nautilus right click menu
1,490,733,977,000
At work, we have an iMac (running OS X) that shares a partitioned hard drive over the network. I'd like to back up to my partition from my Linux machine. I've attempted connecting via cifs, then attempted to back up using backintime onto an encfs-encrypted volume. This throws up a whole lot of errors, and I assume tha...
Would be strange of that was possible in OS X but not with Linux. It's exactly the same: cd /cifs/dir dd if=/dev/zero of=encbackup.img bs=1M count=100 # 100 MiB size sudo losetup /dev/loop0 /cifs/dir/encbackup.img # assuming loop0 is free sudo cryptsetup luksFormat /dev/loop0 sudo cryptsetup luksOpen /dev/loop0 cr_cif...
How can I create an encrypted, file-system–agnostic, mountable volume?
1,490,733,977,000
On OpenBSD, how/with what I can create an encrypted container that can later be dynamically expanded? Can I do it with GPG? (password protection is enough) So, if I open this container and put files in it, it would dynamically expand as more files are put in it. Please do not recommend a Linux solution (e.g. TrueCryp...
The official encrypted container on OpenBSD is through vnode pseudo devices, set up with vnconfig. As far as I know, these cannot be resized: you'd have to create another, larger container and copy the data. Encfs is a FUSE flesystem that performs encryption file by file (so there is no container size issue). There is...
How to create an encrypted container (dynamically expandable) on OpenBSD
1,490,733,977,000
Can I use luks (as in OpenSSL) to encrypt bash output? e.g with OpenSSL: echo "test" | openssl ..... Can I do that with Luks/Cryptsetup in some way? Like this: echo "test" | Luks...
LUKS is not a command, it is name of a technology and/or metadata format so no, you can't use LUKS for encrypting strings. Same applies for cryptsetup which is only a userspace tool (library) for configuring and managing the LUKS/dm-crypt devices and doesn't do the encrypting itself -- data written/read to/from the de...
Is it possible to use luks on output in bash?
1,490,733,977,000
I encrypted a text file in terminal using "gpg -c filename" and got "filename.txt.gpg" created in my file manager. I deleted the original unencrypted file. Now I want to decrypt it in Nano so I can continue working on it. If, in a terminal, I do "gpg -d filename.txt.gpg", the file opens in terminal where I can read i...
gpg -d just prints the file to standard output, but you can redirect the output to a file instead: gpg -d filename.txt.gpg > filename.txt. Or use the -o outputfilename option. Also, you can just run gpg filename.txt.gpg, which cause gpg to guess what you want, and in that case it decrypts the file to filename.txt (dro...
How decrypt a file in nano text editor?
1,490,733,977,000
Are the benefits of btrfs lost if one uses encryptFS on top? What advantages (over ext4) of btrfs remain intact with encryptFS? If I want to have the full benefits of btrfs with encryption, is LUKS the way to go?
Yes use LUKS under btrfs. EncryptFS on top would negate; Transparent compression Data deduplication Copy-on-write ( because COW is on partial file hunks and encryptFS would re-encrypt the whole file )
Are btrfs advantages negated with over-the-top encryption?
1,490,733,977,000
When using openssl version 1.0.2m, I encrypted my test file as follows: openssl enc -aes-256-cbc -salt -in test.txt -out test.txt.enc Just entering password, that's what I wanted. Now, the question is, when decrypting the file, will I in the future need this salt or whatever that is? Or I don't really understand whe...
The salt (or IV, initialization vector) is just used to randomize the encryption. Without one, identical inputs lead to identical outputs, which leaks information (namely the fact that the messages are the same). I think I've mostly seen it called "salt" in connection with password hashing, and usually IV in encryptio...
Confused about salt in openssl encrypt file
1,490,733,977,000
Which command would you suggest to use in order to find out whether a LUKS encrypted partition is mapped or not (other than looking at or using lsblk output)? By opened device, I mean a device for which the command ctrytpsetup luksOpen <device> <map name> was executed.
I would do it like this: $ sudo dmsetup ls crypthome (254:0) $ sudo dmsetup -v table /dev/mapper/crypthome Name: crypthome State: ACTIVE Read Ahead: 256 Tables present: LIVE Open count: 1 Event number: 0 Major, minor: 254, 0 Num...
How to find out whether a LUKS encrypted partition is opened of closed?
1,490,733,977,000
I am trying to extract modulus and exponent components from public key which is in .pem file, using below command: openssl rsa -inform der -pubin -text < pubkey.pem But it is showing me below error message: unable to load Public Key 4339:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:/SourceCache/Ope...
If you already have the public key try to replace the der option with PEM like this: openssl rsa -inform PEM -pubin -text < pubkey.pem Otherwise you can extract the public key from the key.pem file like this: openssl rsa -in key.pem -pubout -out pubkey.pem and then run the first command again.
Unable to extract modulus, exponent from pubkey.pem
1,490,733,977,000
I installed Fedora 14 first, then Ubuntu 10.04. I installed them using dm_crypt/aes256/lvm, so I used encrypted VolumeGroups. At the end of the Ubuntu install it said it cannot install GRUB, so I had to use SuperGRUBdisk to start Fedora and give the command: # grub-install /dev/sda Now I can boot to Fedora normally, ...
I manually edited the Fedoras /boot: I appended a few things to the "/boot/grub/menu.lst"!!! and i could boot in to Ubuntu! The Fedora's "/boot/grub/menu.lst" before editing it: # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot...
How to install Fedora&Ubuntu with encrypted VG's on one disk?
1,700,951,132,000
Preface: I used to run TrueNAS (SCALE) which is where I originally created the tank pool. On Ubuntu Server, I'm trying to assign/change the key of a newly created pool but I am getting the error Key change error: Dataset not encrypted.: user@homeserver:~$ sudo zfs change-key -o keylocation=file:///path/to/zpool.key -o...
Native ZFS encryption does not encrypt pools, it only encrypts filesystems. Further, per-filesystem encryption has to be set up at the time the filesystem is created. In the case of the pool's root filesystem, this means that encryption of the root filesystem must be set at the time the pool is created. So to create...
How can I encrypt a ZFS pool?
1,700,951,132,000
I followed instructions on Speeding up LUKS decryption in GRUB - GRUB/Tips and tricks - ArchWiki. And I created Full Disk Encryption using the guide: Full_Disk_Encryption_Howto_2019 - Community Help Wiki. I want to decrease the iterations for my encrypted boot partition: $ sudo cryptsetup luksDump /dev/nvme0n1p1 LUKS...
(1.) cryptsetup swaps keyslots around for internal reasons, unfortunately you just have to deal with it. From the cryptsetup luksChangeKey manpage: If a key-slot is specified (via --key-slot), the passphrase for that key-slot must be given and the new passphrase will overwrite the specified key-slot. If no key-slot i...
Speeding up LUKS decryption in GRUB using pbkdf-force-iterations
1,700,951,132,000
Is there any way to check if a LUKS device is unlocked, without having sudo permissions? I'm aware of two questions, but all the answers require sudo. It seems that I've found an indirect way (processing the CleartextDevice value of udisksctl info's output), but even assuming it's a stable solution, it's a hack at bes...
Gnome-disks, for example, doesn't require sudo permissions, but it still decodes the locked/unlocked status of LUKS devices. GNOME Disks uses UDisks to get the information. There's nothing hacky about it, the CleartextDevice property will be always either / if the device is locked or a valid object path in form of /...
How to check if a LUKS device is unlocked, without sudo permissions?
1,700,951,132,000
Hello I have a question about LUKS encryption. I have used LUKS to encrypt a disk on my server but when I create a file and add content to it, and cat the file, the content is still in plain text. Even when I create a backup of the file, and put it on the non-encrypted hard drive, the data is in plain text. I'm not su...
LUKS/dm-crypt works on the block device level, not on the filesystem level so yes, this is correct and this is how it works. When you open the encrypted device (/dev/sdb in your case) a new virtual device mapper device is created (/dev/mapper/mybackup in your case) on top of it. All data on sdb is encrypted and myback...
Unable to validate LUKS encryption
1,700,951,132,000
I applied encryption with fscrypt on my home folder on Linux Mint. But now I decided to remove encryption and try something else. I read through the readme of the project, but I couldn't really find exact instructions, how to remove encryption. I have an assumption it could be done maybe by making a backup and deletin...
I think you can't remove encryption. So to achieve that : Copy home files elsewhere (note that having good backups is considered a good practice) Remove /home/theuser directory Create a new /home/theuser directory and apply owner-group permissions Copy files back home enjoy
How to remove encryption from a directory encrypted with fscrypt?
1,700,951,132,000
I'm trying to install Kubuntu 20.04 with LVM encryption on a dual-boot machine. Previously, I'd done this on Mint per these simple steps. In brief, all you have to do setup your partitions manually during the install process: you choose "physical volume for encryption," it prompts you for the password, & creates an ...
Finally figured out a working solution: 1) Follow the extremely thorough instructions here... 2) ...But instead of using his installation script, grab the btrfs-friendly alternative from here... 3) ...And make one manual edit: change the invocation of "cryptsetup luksFormat" to add "--type=luks1". Because per here: T...
Installing Kubuntu with Manual Partitioning & Encryption
1,700,951,132,000
Google cloud services (computing instance) offer encryption by default for disk storage, the customer can provide its own key with the feature customer supplied encryption (detailed here also). How can we apply a disk encryption with cryptsetup without giving the encryption key to google?
On Linux, when using an encrypted disk (luks), it is unlocked at boot time with a password the idea here is to encrypt the disk with cryptsetup on top of the google system (default encryption) and get an earlier access to the instance to be able to unlock the drive at the boot time. This can be implemented with the he...
How to force a custom disk encryption on a google cloud compute instance (gcloud)?
1,700,951,132,000
I need to run a script as a regular user on a remote machine whose root I do not trust. This script outputs very sensitive data to stdout. What steps can I take to ensure only I can read the script’s output? What steps can I take to ensure remnant files on the disk (if there are any) are permanently destroyed?
Root has all privileges on the machine, so there's no way you can protect stdout from root. If the data had only to transit through the machine (e.g. via a network interface) a solution would be to encrypt it at the source, but since the data is generated on the same machine the root user can easily modify the script...
Privacy as regular user against root?
1,700,951,132,000
Suppose these two operating systems and SSH software: GNU/Linux Debian 9.3 with OpenSSH version 1:7.4p1-10+deb9u2 Linux Mint 18.3 with OpenSSH version 1:7.2p2-4ubuntu2.4 And I want to switch away from rsa completely to the benefits of curve ed25519. The question is, after I generate ed25519 on both systems with: ss...
No, deleting the key pair is fine. All you have to do is to delete your public key from the server. However, you don't remove it with rm; you delete the relevant lines from the ~/.ssh/authorized_keys file. Check first that you can log in with your new key pair! For cleanliness, I'd also suggest you to remove your priv...
What is the correct way to remove RSA key-pair entirely from my SSH configuration?
1,700,951,132,000
I'd like to encrypt my home folder in CentOS. I notice Dovecot has created directories and files under ~/mail. If I encrypt, will my email stop working (remote access over imap and smtp)?
Your unencrypted directory is available only when you are logged in, it's a fake filesystem provided by the decryption program. When you're logged out, the fake (decrypted) filesystem does not exist. dovecot, at, cron cannot see it. Reconfigure dovecot to only use files/dirs that exist while you're logged out.
Encrypted home folder and email
1,700,951,132,000
I'm trying to following this documentation (see section Create a Code Signing Certificate) in oder to encrypt a p12 file but I always receive the same warning. unknown option 'Cert.p12' Am I doing something wrong? This is the command I'm running openssl enc -aes-256-cbc -a -salt -k -in "Cert.p12" -out "Cert.p12.encr...
You have a error in your command. The -k option requires a password. From the man enc page: -k password the password to derive the key from. This is for compatibility with previous versions of OpenSSL. Superseded by the -pass argument. As you can see, the option has been superseded by the -pass option. Therefo...
Encrypting a p12 certificate
1,700,951,132,000
I am able to successfully authenticate by typing in the encryption password (and hitting return), but nothing is displayed on the screen to prompt me for this information. I tend to just "wait enough time" before attempting to type in my password. A coworker said he observed the same behavior, but hitting the ESC key...
My first guess would be that for some reason the splash screen is hiding or blocking the passphrase prompt. You can check whether this is the case by switching off the splash screen. To do so, we must make changes to the configuration of the bootloader which in mint should be grub (GRand Unified Bootloader): Start a ...
No prompt on boot with full disk encryption enabled
1,700,951,132,000
I created a separate partition on a CentOS install (VirtualBox), and am attempting to encrypt it using cryptsetup and LUKS. I'm using the following commands to get this set up: cryptsetup luksOpen /dev/mapper/VolGroup-db00 db_fips (no error, all clear) mkfs -t ext4 /dev/mapper/db_fips (no error, all clear) e2fsck -f ...
Creating an encrypted volume does just that: create an encrypted volume on the disk. Using the volume on your live system is a concept that only makes sense as long as the system remains live: it needs to be done all over again if the system reboots. So you need to arrange for the volume to be brought up during the sy...
luks volume disappears after reboot
1,700,951,132,000
Last weekend there was a cryptographic challenge where the ciphertext was the following hex: FC 89 BF C2 B0 5F 1C 2E 64 B8 78 43 92 78 3A C9 I know for sure that this is encrypted using AES/Rijndael 128-bit ECB, the key is REDRYDER and a solution for this has already been posted to confirm this. The plain text is FL...
The openssl command line tool is a demo of the OpenSSL library. It has a pretty haphazard interface and poor documentation. I don't recommend using it for anything other than testing the OpenSSL library. (Yes, there are people who manage CAs with openssl. I fear for their sanity.) AES operates with a key, not with a ...
Proper options for openssl with simple ciphertext
1,700,951,132,000
I've written a little script for my Clonezilla USB stick which will allow me to quickly back everything up without entering any options by simply running the script. Next, I'd like to store my public GPG key on the stick and add some encryption to my backups like so: find . -maxdepth 1 -type f -not -iname "*.gpg" | wh...
You must have the target key in the keyring. I am not sure whether it is necessary that the target key is valid; better make it so. You should use a config directory on the stick. With this directory being empty you import the key: gpg --homedir /dir/on/stick --import /target/key.asc This needs to be done just once. ...
Batch encryption using a public GPG key
1,700,951,132,000
I used ecryptfs-migrate-home to encrypt my home folder on my Debian (Testing) system. As I am a complete encryption-greenhorn, I don't know yet how to check, if the encryption succeeded. However, I suppose encryption works but filenames are not encrypted. I want to have encrypted filenames as well. How can I get encry...
The encrypted home utilities don't support the ability to enable encrypted filenames after you've set up your encrypted home directory. But, I looked at the ecryptfs-migrate-home script and believe that it should be enabling filename encryption by default. Let's verify that filename encryption is enabled. Do you have ...
setup filename encryption for encrypted home folder in eCryptfs
1,700,951,132,000
Disclaimer I'm not robbing someone, didn't rob someone in the past and don't plan to do so anytime soon. Situation Imagine I own a Samsung 2.5" SSD (850, 860 or the like) which is encrypted. If it's a software encryption like Bitlocker, FileVault or VeraCrypt, I can simply reformat the disk and should be fine. But the...
If I understood you correctly, you don't want to decrypt the disk, you want to make it usable. Linux: Install sedutil and follow this guide: https://superuser.com/a/1769237 Windows: Put this drive into a Windows PC Install Samsung Magician Disable HW encryption.
erase hardware-encrypted SSD
1,700,951,132,000
I have an Arch installation on a LUKS-encrypted LVM. After I installed Debian on a different NVME drive I'm no longer able to cryptsetup open the partition from other systems, nor can I boot into Arch. # cryptsetup open /dev/nvme0n1p3 arch Device /dev/nvme0n1p3 is not a valid LUKS device. Here is a hexdump -C of ...
The issue was solved using Method #1 created and kindly suggested by frostschutz. Everything worked out smoothly and without any errors. After dumping and repairing a LUKS header file I was able to use it to open the partition. Then I mounted the volume after scanning for it using lvscan. For more extreme cases there ...
Encrypted LVM "is not a valid LUKS device", cannot boot or open
1,700,951,132,000
I recently learned that Linux supports Adiantum as a disk encryption cipher (run cryptsetup benchmark -c xchacha20,aes-adiantum-plain64 to try it out on your system). While Adiantum is primarily meant to provide faster disk encryption for low-end devices that do not support hardware AES acceleration, it is also a wide...
The designers of Adiantum also tackled this question and came up with HCTR2. It is similar to Adiantum but uses AES-XCTR as encryption and POLYVAL as accelerated hash function. Available in Linux kernel version 6.
Fast wideblock AES disk encryption in Linux?
1,700,951,132,000
How can I securely mount an encrypted container? I want to encrypt a bunch of small files (let's say my diary). When locked, this should appear as a single file with unreadable contents. When I unlock it, it should be mounted as a file system showing the files and directories inside with a shell opened at the root of ...
I assume you already have a container set up via LUKS. If not, create an empty file using fallocate (not smaller than 100MB), then proceed to cryptsetup luksFormat it like you'd normally set up a LUKS volume. It's (somewhat) possible if you have root privileges; not if you're trying to protect it against someone else...
Securely mount an encrypted container
1,700,951,132,000
I have a luks device and it is opened on boot by /etc/crypttab. lsblk looks like this: sdc 8:32 1 114,6G 0 disk └─luks-672dcc74-d002-47dc-b61b-525baf91dc7c 253:2 0 114,6G 0 crypt I pmount the device like this: pmount /dev/mapper/luks-672dcc74-d002-47dc-b61b-525b...
Note: I'm completely unfamiliar with pumount, and I don't even have a Debian install available for testing, so I just grabbed the source code from Debian and making wild assumptions based on what I found in there… pumount has an option, --luks-force to close LUKS devices it did not open (as you already quoted from the...
Why does pumount close a luks device it did not open?
1,700,951,132,000
I want to add encrypted swap file in FreeBSD 13. I have read this documentation page, but it doesn't explain how to set up encryption for the swap file. I've also read another one, but it only gives examples for encrypted swap partitions, not swap file. The aim is to have encrypted swap file activated on system startu...
The link provided by @r bert is close, but could benefit from a little fine-tuning. Credit to original creator mb2015 on the FreeBSD forum. This method creates a custom service script and establishes controlling parameters in /etc/rc.conf. To begin, create /usr/local/etc/rc.d/encrypted_swapfile by copying and pasting...
How to add encrypted swap file on FreeBSD 13
1,700,951,132,000
I am currently trying to automate the encryption and decryption of a collection of files. For the encryption I currently use: gpg --batch --recipient [RECIPIENT] --encrypt-files [FILES] For the decryption I use pretty much the same: gpg --batch --decrypt-files [FILES] But both during encryption as well as decryption...
As @a-b and @frostschutz suggested, wrapping the files in a tar file and then encrypting is an option. However, I would like to have access to the original file structure without decrypting. For now, I have resorted to aligning the file permissions after the batch decryption. This has the additional benefit of alignin...
How do I decrypt files with gpg / gnupg without loosing the original file permissions?
1,700,951,132,000
I'm trying to open a bitlocker encryptet partition (/dev/nvme0n1p2) with cryptsetup, but it always returns the following error: # cryptsetup -v open --type bitlk /dev/nvme0n1p2 crypt0 Enter passphrase for /dev/nvme0n1p2: Command failed with code -1 (wrong or missing parameters). The partition uses a clear encryption ...
cryptsetup currently doesn't support unlocking BitLocker devices with a clear key. So you'll need to use dislocker with this device. There is unfortunately still a lot of BitLocker features we don't support in cryptsetup. Feel free to report an RFE issue on cryptsetup GitLab. (Btw. It's weird, it doesn't show the corr...
can't open bitlocker encrypted devices with a clear key with cryptsetup but it works with dislocker
1,592,400,743,000
I plan to provide a Linux appliance to several users. These users are tech savvy and can easily reset the root password on a standard linux system. How can I create a running Linux system that keeps even the root user out of the filesystem once protected? (I looked at disk encryption like LUKS but in all cases the r...
I found the answer: encrypt the full disk with LUKS, then store the keys in the system TPM. That way the entire disk is encrypted and an end user can't extract the keys from the TPM...very secure: LUKS with TPM
Protecting (encrypting) system from even root access
1,592,400,743,000
Is there any tools to encrypt folder except encfs for debian?
cryptsetup can be used; MOUNT_NAME=example cryptsetup luksOpen /path/to/file "$MOUNT_NAME" mount "/dev/mapper/$MOUNT_NAME" /path/to/mount encfs encrypts per file disadvantage: attackers know your file sizes, layout, modification time etc. advantage: no need to grow or shrink your container cryptsetup encrypts per m...
Tools to lock/encrypt folder in debian
1,592,400,743,000
I have a large folder encrypted with eCryptfs and synced with Dropbox. Is somehow possibile to migrate it to EncFS without re-encrypting it and thus without re-upload it to Dropbox?
No. Encfs and Ecryptfs use different format. The only way to convert between them is to decrypt one and encrypt for the other.
How to migrate a folder encrypted with eCryptfs to EncFS
1,592,400,743,000
I know. Tails itself is a very secure operating system, but what about its drive encryption? I would like to encrypt my flash drive with the tails built in drive encryption. What does it use? AES-256?
As explained in the documentation, Tails uses dm-crypt through its LUKS front-end. This is the standard for disk encryption under Linux. LUKS offers a choice of ciphers; the defaults are good (AES-256, CBC or XTS depending on the version, PBKDF2 for password hashing).
How Secure Is Tails Encryption? [closed]
1,592,400,743,000
I need to install the package loop-aes-utils on Debian 8.0 to following this Ubuntu tutorial. It is not in Debian official package however. Would it be the aespipe package or is it another package? # apt-cache search aes | grep loop aespipe - AES-encryption tool with loop-AES support My sources.list file: # /etc/apt...
loop-aes-utils is obsolete and was removed in 2012. You should use cryptsetup instead, as described in the “Encryption with dm_crypt” section at the start of the tutorial you're following.
Cannot install loop-aes-utils on debian 8.0
1,592,400,743,000
Situation: I am on Debian 8.5. I installed VirtualBox 5.0.22 and its Extension Pack. I further encrypted the VM via VirtualBox: VM settings -> General -> Encryption -> Enable Encryption. Question: How to start and stop the encrypted VirtualBox VM from terminal in headless mode?
To start the VM in headless mode with password, you need to create a file containing the password, suppose: /home/user/vmname-password Then you need to execute the two following commands: VBoxManage startvm "vmname" --type headless VBoxManage controlvm "vmname" addencpassword "vmname" "/home/user/vm-name-password" ...
How to start an encrypted VirtualBox VM from terminal in headless mode
1,592,400,743,000
I was thinking about having an encrypted USB flash memory where I would store some passwords and that kind of information. I want it to be encrypted just in case I lose it and someone finds it. I was wondering if it's possible to "encrypt" using public keys like in SSH. I don't know if it would be called encryption bu...
You can use gpg for asymmetric encryption. Basically you do the following (after you generated a gpg key): $ gpg -ea -r [email protected] file.ext This will create an encrypted file called file.ext.asc in your current directory (-r specifies the recipient, in this case that's you). To decrypt do the following $ gpg ...
Encrypted USB with SSH keys system
1,592,400,743,000
I have to encrypt a hash, eg: 2c1400f69867571ab4e60d3b8f01e0b17c7be89e321f91f8a07cd39eeba202e2 using the RSA algorithm by using a public key(eg: mykey.key) that was already provided to me. How do I go about doing this. I see sites telling me to use openssl, but I'm not sure how to go about this. EDIT : I tried doing ...
Try: $ cat file.txt | openssl rsautl -encrypt -pubin -inkey mykey.key > secret.txt cat secret.txt }[4�Or)f���r�_ # more binary data here... and then: $ cat secret.txt | openssl rsautl -decrypt -inkey myprivatekey.key 2c1400f69867571ab4e60d3b8f01e0b17c7be89e321f91f8a07cd39eeba202e2 Both keys should be in PEM format.
Encrypt a hash using RSA
1,592,400,743,000
I was about to backup my archlinux, following this guide to my FritzBox, (which enforces a NTFS system that I mounted via samba) as I remembered, that NTFS is not capable to keep permissions and other stuff like symlinks. There is also no encryption available which is really bad because it would break the idea to encr...
I would mount ecryptfs on the ntfs filesystem and still use rsync - as long as you don't need to read the files from windows. Just watch out for long path names as you might hit some trouble: http://www.telmon.org/?p=631 As a side note, I haven't tried this but the encfs4win project looks good if you need access from ...
backup / on ntfs filesystem encrypted
1,592,400,743,000
Which package contains the implementation of IPsec and which package contains the implementation of encryption algorithms that IPsec uses for encryption? I need to use custom crytographic algorithms in IPsec, so I need to edit the implementations of these packages.
On Linux and most other unices, IPsec and other network protocols up to the transport layer are implemented in the kernel. There are additional userland tools that handle key exchange; several implementations exist. The cryptographic algorithms are in crypto. The network protocols are spread around net/ipv4, net/ipv6 ...
Which packages contain IPsec implementations and algorithms that use it for encryption?
1,592,400,743,000
I need to convert my /etc/password file into /etc/shadow. I found this command for manually generating password in shadow. openssl passwd -6 -salt xyz yourpass but I need to convert my /etc/password to /etc/shadow, is there any command for that?
Yes, there is. Read man pwconv.
is there any command which converts my etc/password/ file into etc/shadow/ file?
1,592,400,743,000
I have a need to securely transmit data between two endpoints via rsync. This is illustrated in the diagram. My client wants me to use a VPN connection, as the VPN server already exists and is used as a jump server to access the application environment. Plus they regard a VPN as more secure than using ssh, as the end...
If you really want to avoid something between the VPN endpoint and the far end sniffing your rsync, then yes you need to wrap it in another layer terminated only by the far end. SSH is one option for that; stunnel might be another if you have enough control over the process.
rsync end-to-end encryption when using a VPN?