cryptsetup | Cryptsetup and LUKS - open-source disk encryption | File Utils library

 by   cryptsetup C Version: Current License: Non-SPDX

kandi X-RAY | cryptsetup Summary

kandi X-RAY | cryptsetup Summary

cryptsetup is a C library typically used in Utilities, File Utils applications. cryptsetup has no bugs and it has low support. However cryptsetup has 2 vulnerabilities and it has a Non-SPDX License. You can download it from GitLab.

Cryptsetup and LUKS - open-source disk encryption
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              cryptsetup has a low active ecosystem.
              It has 577 star(s) with 135 fork(s). There are no watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 39 open issues and 0 have been closed. On average issues are closed in 9 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of cryptsetup is current.

            kandi-Quality Quality

              cryptsetup has no bugs reported.

            kandi-Security Security

              cryptsetup has 2 vulnerability issues reported (0 critical, 1 high, 1 medium, 0 low).

            kandi-License License

              cryptsetup has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              cryptsetup releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cryptsetup
            Get all kandi verified functions for this library.

            cryptsetup Key Features

            No Key Features are available at this moment for cryptsetup.

            cryptsetup Examples and Code Snippets

            No Code Snippets are available at this moment for cryptsetup.

            Community Discussions

            QUESTION

            oc rsh + awk prints extra indentation at beginning of each line, seems only did line break but does not return carriage
            Asked 2022-Apr-15 at 09:34

            I want to filter lines of oc rsh du -shc output like this:

            ...

            ANSWER

            Answered 2022-Apr-14 at 17:05

            It's very odd that your oc rsh broker-amq-1-15-snd64 du -shc / 2>/dev/null | od -c output shows no blanks or tabs, e.g. between cannot and read in:

            Source https://stackoverflow.com/questions/71872557

            QUESTION

            LUKS and dm-crypt distinction responsibilities
            Asked 2022-Apr-02 at 09:45

            Reading through the documentation of both dm-crypt and LUKS, I understand that LUKS is a format specification to allow FDE, and that dm-crypt is a dm target which allows encryption / decryption of writes / reads to the block device.

            However, I'm unsure about what each of these now exactly provides (ie what are the responsibilities). In the slides that the author (Milan Broz) made, it mentions that LUKS2 can also provide integrity protection (hence making the encryption authenticated). From this, and also reading the LUKS1 specification I think this is not possible in LUKS1. However, later in the slides it talks how dm-crypt allows for authenticated encryption. This is where I'm confused; do we assume we use LUKS2?

            I feel like I'm not really grasping the main function and responsibilities of both LUKS and dm-crypt.

            Thanks!

            ...

            ANSWER

            Answered 2022-Apr-02 at 09:45

            Lets start from the kernel part:

            • Device mapper is a kernel driver that allows creating new block devices from existing ones. It provides multiple additional features like RAID, caching or encryption through so called targets.
            • dm-crypt is a device mapper target that provides transparent encryption. This means you can create a block device on top of your disk or partition and everything you write to this new device mapper device will be encrypted before the data is actually written to the disk. And vice versa for reading: if you read from the device, the data is read from the disk and decrypted before returning to you.
            • dm-integrity is also a device mapper target, this one has a special metadata area for each block which are used to store checksum of the data block. This allows detection of data corruption.

            Now the userspace level:

            You can use device mapper directly, but it's not user friendly. Say you want to use dm-crypt directly -- to access the data you need to know the encryption algorithm, used IV and of course the key (which isn't short and easy to remember). It wouldn't be very practical to ask for these during boot.

            That's where LUKS comes in. It provides two things: header and way to store (and manage) keys. Header allows system to identify the device as LUKS and contains all the metadata needed to work with the device. And key management allows you to safely store the encryption key on the disk, protected by easy to remember passphrase (or key file, TPM, FIDO token, etc.).

            So the LUKS format only gives system all the information needed to correctly set the device mapper device up. You'll most likely use cryptsetup for that -- tool and library that can read the LUKS metadata, decrypt the key stored in there and correctly create the DM device.

            The difference between LUKSv1 and LUKSv2 is in the format of the metadata. LUKSv2 adds some features, one of them is the authenticated encryption, which is combination of dm-crypt and dm-integrity -- integrity provides the checksums and crypt makes sure the checksums are also encrypted so it isn't possible to simply change both data and the cheksum hiding the change (plain integrity doesn't protect against this, it can be used only to protect about random data changes like bit rot). So authenticated encryption is provided by combining two technologies with LUKSv2 -- the metadata in the LUKSv2 header tell how the two device mapper targets needs to be configured and combined to get the data.

            Source https://stackoverflow.com/questions/71688533

            QUESTION

            biber wants to load libcrypt.so.1 but it is missing
            Asked 2022-Feb-21 at 10:53

            I am Arch GNU/Linux user who usually manages almost every package with pacman; I manage TeX and LaTeX-related things with tlmgr. I installed tlmgr from source.

            I am writing paper. I would like to use bibliography.

            When I tried latexmk -pdflua main.ltx:

            ...

            ANSWER

            Answered 2022-Feb-21 at 10:53

            Install libxcrypt-compat from the AUR, as suggest in this answer.

            This made my biber from TeX Live 2020 work again. The interesting question is if newer TeX distributions will require this AUR package.

            Source https://stackoverflow.com/questions/71171446

            QUESTION

            SELinux and cryptsetup: chown failed and can't access temporary keystore
            Asked 2021-Jul-16 at 08:52

            I am trying to set up SELinux and an encrypted additional partition that I mount at startup using a systemd service.

            If I run SELinux in permissive mode, everything runs ok (partition is correctly mounted, data can be accessed and service runs properly).

            If I run SELinux in enforcing mode (enforcing=1), I am not able to mount such partition with the error:

            ...

            ANSWER

            Answered 2021-Jul-16 at 08:52

            Solved assigning to cryptsetup the lvm_exec_t context.

            In the lvm.fc file cryptsetup was defined as /bin/cryptsetup but I had to change it to /usr/sbin/cryptsetup where it actually was.

            Source https://stackoverflow.com/questions/68163429

            QUESTION

            slurmd.service is Failed & there is no PID file /var/run/slurmd.pid
            Asked 2020-Oct-08 at 11:10

            I am trying to start slurmd.service using below commands but it is not successful permanently. I will be grateful if you could help me to resolve this issue!

            ...

            ANSWER

            Answered 2020-Oct-06 at 11:16

            The log files states that it cannot bind to the standard slurmd port 6818, because there is something else using this address already.

            Do you have another slurmd running on this node? Or something else listening there? Try netstat -tulpen | grep 6818 to see what is using the address.

            Source https://stackoverflow.com/questions/64156511

            QUESTION

            Command 'vagrant' not found
            Asked 2020-Sep-30 at 22:54

            I am re-installing vagrant on my local machine unsuccessfully. Initially, I had vagrant downloaded, installed and running well, but decided to uninstall it. My uninstall was as follows:

            ...

            ANSWER

            Answered 2020-Sep-30 at 22:54

            As you just removed the files instead of using apt-get or dpkg to uninstall the package, the package management is not aware of your manual removal, and so apt-get and dpkg still think the newest version is already installed, and so do nothing.

            apt-get --reinstall install vagrant

            should solve this.

            Source https://stackoverflow.com/questions/64129477

            QUESTION

            How to enter/answer a terminal prompt from a Perl script?
            Asked 2020-Sep-27 at 09:18

            I'm trying to crack a forgotten password for a luks partition. I generated a list of combinations, and now I'm trying to decrypt the volume from a Perl script.

            The problem is to enter the prompt from the script itself, since: system('cryptsetup', ('open', '/dev/sdd1', 'crypt-vol', '--type=luks')) just spits Enter passphrase for /dev/sdd1 and waits for me to enter it manually.

            How can I approach this?

            Many thankyous for any help.

            * it's my volume and I haven't forgotten the password completely, so I created the list of combinations provided that I remember some details. It's like >6k of possibilities, so it should be feasible to break it.

            ...

            ANSWER

            Answered 2020-Sep-26 at 16:11

            Don't, use a 'keyfile' with cryptsetup. A key file can be STDIN.

            So:

            Source https://stackoverflow.com/questions/64076882

            QUESTION

            How to programatically find the start and end bytes of LUKS header?
            Asked 2020-Mar-18 at 06:47

            How can I programmatically determine the exact start byte and exact end byte of a LUKS header on a block storage device?

            I use Linux Unified Key Setup (LUKS) for Full Disk Encryption (FDE), so all of the data on my drive is encrypted using a strong master key that's not derived from my passpharse, and I'm working on a script that will securely wipe the drive in an panic/emergency shutdown situation (ie: someone is physically stealing your laptop).

            Let's say I have a 1000T drive and time is too short (~30 seconds) in my emergency scenario to actually fill the drive with random bytes. Instead, I'd just like to overwrite the header because all of the data on the drive is worthless if the header (containing the keyslots with the master key and salts) is lost--even if the passphrase were recovered via rubber-hose cryptanalysis.

            How can I programmatically safely determine the start byte and end byte of the LUKS header so I know what to overwrite?

            Note: The solution provided must be valid for both LUKS1 (released in 2014) and LUKS2 (released in 2018).

            In LUKS1, I've found that the start is 0 and the end is determined by multiplying the payload-offset field from the container's binary header by 512. For example

            ...

            ANSWER

            Answered 2020-Mar-18 at 06:47

            Here's a quick python script that will output the start and end bytes for a given LUKS container:

            Source https://stackoverflow.com/questions/60734647

            QUESTION

            Destroying luks header on dm-crypt linux
            Asked 2020-Mar-09 at 08:57

            I am trying to destroy the luks header on one of my logical volume data1, I am still able to read the file inside data1 after I delete the luks header. I suppose it should not be the case right? Can someone help me in understanding this case?

            lsblk output ...

            ANSWER

            Answered 2020-Mar-09 at 08:57

            It seems you are destroying already mounted partition.

            Encryption/decryption keys are hold in the memory while the partition is mounted. You should unmout your LUKS partition first:

            Source https://stackoverflow.com/questions/60289422

            QUESTION

            Does anybody know how to link against `ld` on `WSL`?
            Asked 2020-Feb-26 at 03:28

            I'm compiling a test program on clion using windows subsystem for linux WSL. I am using dlopen etc. to load a library at runtime. The error I am getting is:

            ...

            ANSWER

            Answered 2020-Feb-26 at 03:28

            I think you are confusing the GNU link library flag -l with the library name dl, which together in the link stage appear as -ldl. If the library is in the system path (of WSL), you should not need the full path to the library either. You can simply put the library name dl in this command:

            Source https://stackoverflow.com/questions/60403761

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install cryptsetup

            You can download it from GitLab.

            Support

            For any new features, suggestions and bugs create an issue on GitLab. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://gitlab.com/cryptsetup/cryptsetup.git

          • sshUrl

            git@gitlab.com:cryptsetup/cryptsetup.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular File Utils Libraries

            hosts

            by StevenBlack

            croc

            by schollz

            filebrowser

            by filebrowser

            chokidar

            by paulmillr

            node-fs-extra

            by jprichardson