Categorygithub.com/containers/luksy
modulepackage
0.0.0-20241007190014-e2530d691420
Repository: https://github.com/containers/luksy.git
Documentation: pkg.go.dev

# README

luksy: offline encryption/decryption using LUKS formats Cirrus CI Status

luksy implements encryption and decryption using LUKSv1 and LUKSv2 formats. Think of it as a clunkier cousin of gzip/bzip2/xz that doesn't actually produce smaller output than input, but it encrypts, and that's nice.

  • The main goal is to be able to encrypt/decrypt when we don't have access to the Linux device mapper. Duplicating functions of cryptsetup that it can perform without accessing the Linux device mapper is not a priority.
  • If you can use cryptsetup instead, use cryptsetup instead.

# Packages

No description provided by the author

# Functions

DecryptReader creates an io.ReadCloser which buffers reads through a decryption function, decrypting and returning multiples of the blockSize until it reaches the end of the file.
EncryptV1 prepares to encrypt data using one or more passwords and the specified cipher (or a default, if the specified cipher is "").
EncryptV2 prepares to encrypt data using one or more passwords and the specified cipher (or a default, if the specified cipher is "").
EncryptWriter creates an io.WriteCloser which buffers writes through an encryption function, transforming and writing multiples of the blockSize.
No description provided by the author
No description provided by the author
No description provided by the author
ReadHeaders reads LUKS headers from the specified file, returning either a LUKSv1 header, or two LUKSv2 headers and a LUKSv2 JSON block, depending on which format is detected.

# Constants

No description provided by the author
Mostly verbatim from LUKS1 On-Disk Format Specification version 1.2.3.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Mostly verbatim from LUKS2 On-Disk Format Specification version 1.1.1.
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

ReadHeaderOptions can control some of what ReadHeaders() does.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

ReaderAtSeekCloser is a combination of io.ReaderAt, io.Seeker, and io.Closer, which is all we really need from an encrypted file.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author