aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/Crypto
Commit message (Collapse)AuthorAgeFilesLines
* fix: Autodetect legacy filekey instead of trusting the header for legacy headerCôme Chilliet2024-06-041-16/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Add SPDX headerAndy Scherzinger2024-05-294-102/+16
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-1/+1
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Improve typing as suggested by reviewCôme Chilliet2023-08-081-32/+7
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Migrate away from ILogger in encryptionCôme Chilliet2023-08-082-124/+40
| | | | | | And modernize code a bit Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix sharing of encrypted filesCôme Chilliet2023-07-181-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(i18n) Changed grammar related to "login"rakekniven2023-07-151-1/+1
| | | Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
* Increase from 100000 to 600000 iterations for hash_pbkdf2Côme Chilliet2023-05-231-9/+9
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Log failures to delete legacy file keyCôme Chilliet2023-05-041-1/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #37724 from nextcloud/fix/encryption-signature-check-logicChristoph Wurst2023-04-171-4/+6
|\ | | | | Cleanup signature checking logic in encryption
| * Cleanup signature checking logic in encryptionjld31032023-04-141-4/+6
| | | | | | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* | Merge pull request #36351 from ↵Joas Schilling2023-04-141-39/+34
|\ \ | |/ |/| | | | | nextcloud/bugfix/noid/move-encryption-password-email-to-template Move encrypt-all password email to EmailTemplate
| * Move encrypt-all password email to EmailTemplateJoas Schilling2023-03-081-39/+34
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Add a test for multiKeyEncrypt/Decrypt methodsCôme Chilliet2023-03-201-0/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix encryption file key managementCôme Chilliet2023-03-171-1/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Adapt code to new encryption systemCôme Chilliet2023-03-172-24/+19
| | | | | | | | | | | | | | | | | | fileKey gets deleted upon save as it’s stored in shareKeys instead now. We use presence of a fileKey to detect if a file is using the legacy system or the new one, because we do not always have access to header data. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Getting rid of openssl_seal and rc4 in server side encryptionCôme Chilliet2023-03-172-15/+77
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Set functions as private to be able to refactor laterCôme Chilliet2023-02-211-7/+9
| | | | | | Also a few comment fixes Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Move to phpseclib implementation of RC4Côme Chilliet2023-02-211-42/+16
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Strong type custom openssl_seal implementationCôme Chilliet2023-02-211-28/+12
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Always wrap rc4, and throws on unknown cipherCôme Chilliet2023-02-211-34/+11
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* introduce wrapped_openssl_seal() and wrapped_openssl_open() to circument RC4 ↵Kevin Niehage2023-02-211-2/+164
| | | | | | problems with OpenSSL v3 Signed-off-by: Kevin Niehage <k.niehage@syseleven.de>
* Remove workarounds specific to 7.4Côme Chilliet2023-01-201-4/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix psalm issues related to signature changes from PHP 8.0Côme Chilliet2022-12-291-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Replace getSystemValue in encryption appJ0WI2022-12-051-3/+3
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Save encrypted files in binary formatplumbeo2022-05-042-26/+71
| | | | | | | | | | | | | Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on https://github.com/owncloud/encryption/pull/224 and https://github.com/owncloud/core/pull/38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
* Fix a few psalm issues and moved back to psalm/phar 4.18Carl Schwan2022-01-121-2/+2
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Generate strong, human readable OTPJ0WI2021-07-081-1/+1
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Remember current cipherJ0WI2021-06-291-4/+23
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Merge pull request #26323 from J0WI/crypt-constblizzz2021-06-231-26/+24
|\ | | | | Use constant for supported formats
| * Use constant for supported formatsJ0WI2021-03-261-26/+24
| | | | | | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-044-4/+2
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | l10n: Unify spellingValdnet2021-05-201-3/+3
| | | | | | Spelling unification in Nextcloud applications.
* | Merge pull request #26219 from nextcloud/relative-path-nullRoeland Jago Douma2021-03-301-1/+1
|\ \ | | | | | | getRelativePath can return null
| * | getStorage can also return nullRobin Appelman2021-03-241-1/+1
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / Drop OpenSSL 0.9.8 workaroundJ0WI2021-03-261-7/+0
|/ | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Harden EncryptAll check for empty emailRoeland Jago Douma2021-02-151-1/+1
| | | | | | | Reported by psalm For #25641 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove unneeded casts that were found by PsalmMorris Jobke2021-01-111-1/+1
| | | | | | In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* FIXME use default RC4 methodRoeland Jago Douma2020-12-071-2/+2
| | | | | | * We should pick better default method! Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix encryption testRoeland Jago Douma2020-12-071-1/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* The encryption decrypt position can be int or stringChristoph Wurst2020-10-132-2/+2
| | | | | | | The public API said string, internally we treated it as int. In reality both are used. Let's reflect that in the documented argument type. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-052-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-242-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make legacy cipher opt inRoeland Jago Douma2020-08-191-1/+16
| | | | | | | | * Systems that upgrade have this enabled by default * New systems disable it * We'll have to add some wargning in the setup checks if this is enabled Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* SSE enhancementRoeland Jago Douma2020-08-111-2/+8
| | | | | | | Do not blind concatenate ints. Lets add a _ between them. So that we can distrinquis them properly Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Encryption is ready if master key is enabledJulius Härtl2020-07-211-0/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update license headers for 19Christoph Wurst2020-04-292-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-102-7/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-104-32/+12
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>