From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
Oleksij Rempel <linux@rempel-privat.de>
Cc: barebox@lists.infradead.org, Gerd Pauli <gp@high-consulting.de>
Subject: Re: [PATCH v1] Crypt and decrypt files using password in keystore.
Date: Mon, 23 Apr 2018 10:33:22 +0200 [thread overview]
Message-ID: <8fbdaa19-13bc-9b27-7b69-ca3ca50872cf@pengutronix.de> (raw)
In-Reply-To: <20180423081348.hylbpdraydokxvt4@pengutronix.de>
[-- Attachment #1.1.1: Type: text/plain, Size: 4004 bytes --]
On 23.04.2018 10:13, Sascha Hauer wrote:
> On Sun, Apr 22, 2018 at 10:27:11AM +0200, Oleksij Rempel wrote:
>> Hi Gerd,
>>
>> please use scripts/checkpatch.pl
>>
>> currently i get
>> total: 2020 errors, 0 warnings, 2020 lines checked
>>
>> We use kernel coding style. Please read it:
>> https://www.kernel.org/doc/html/v4.16/process/coding-style.html
>>
>> Am 20.04.2018 um 10:01 schrieb Gerd Pauli:
>>> Adds ccryptlib library in crypto which implements a
>>> stream cipher based on the block cipher Rijndael,
>>> the candidate for the AES standard.
>>> Compatible with the ccrypt tool in linux
>>> from Peter Selinger.
>>>
>>> Usage: ccrypt [-e|-d] -k KEYNAME_IN_KEYSTORE SRC DST
>>>
>>> Signed-off-by: Gerd Pauli <gp@high-consulting.de>
>>> ---
>>> commands/Kconfig | 17 +
>>> commands/Makefile | 1 +
>>> commands/ccrypt.c | 249 +++++++++
>>> crypto/Kconfig | 7 +
>>> crypto/Makefile | 1 +
>>> crypto/ccryptlib.c | 1467 +++++++++++++++++++++++++++++++++++++++++++++++++++
>>> include/ccryptlib.h | 102 ++++
>>> 7 files changed, 1844 insertions(+)
>>> create mode 100644 commands/ccrypt.c
>>> create mode 100644 crypto/ccryptlib.c
>>> create mode 100644 include/ccryptlib.h
>>>
>>> diff --git a/commands/Kconfig b/commands/Kconfig
>>> index 951a86963..b6911246a 100644
>>> --- a/commands/Kconfig
>>> +++ b/commands/Kconfig
>>> @@ -2137,6 +2137,23 @@ config CMD_SEED
>>> help
>>> Seed the pseudo random number generator (PRNG)
>>>
>>> +config CMD_CCRYPT
>>> + tristate
>>> + prompt "ccrypt"
>>> + select CRYPTO_CCRYPTLIB
>>> + select CRYPTO_KEYSTORE
>>> + help
>>> + encrypting/decrypting a character stream
>>> + ccrypt implements a stream cipher based on the block cipher
>>> + Rijndael.
>>
>>> + Usage: ccrypt [-ed] [-K name] srcfile dstfile
>>> +
>>> + Options:
>>> + -e encrypt srcfile to dstfile
>>> + -d decrypt srcfile to dstfile
>>> + -k name use key with name from keystore
>>> +
>>
>> usage help should be provided by the command, not within Kconfig
>
> Indeed we have the help provided in the Kconfig text for all commands
> that were present at that change. I don't really think it's worth
> continuing this though.
>
>>> + * This program is free software; you can redistribute it and/or
>>> + * modify it under the terms of the GNU General Public License as
>>> + * published by the Free Software Foundation; either version 2 of
>>> + * the License, or (at your option) any later version.
>>> + *
>>> + * This program is distributed in the hope that it will be useful,
>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
>>> + * GNU General Public License for more details.
>>> + */
>>> +
>>> +/* ccrypt implements a stream cipher based on the block cipher
>>> + Rijndael */
>>> +
>>> +/* needs library ccryptlib and keystore from barebox */
>>
>> no need for this comment, needed headers are already included
>>
>>> +#include <common.h>
>>> +#include <command.h>
>>> +#include <libfile.h>
>>> +#include <getopt.h>
>>> +#include <fcntl.h>
>>> +#include <fs.h>
>>> +#include <ccryptlib.h>
>>
>> i prefer headers sorted alphabetically. this helps to reduce
>> patch conflicts.
>
> And I prefer the reverse christmas tree ordering ;)
>
> To be honest, I don't care about the ordering at all, but at least as
> long as we haven't agreed on some ordering and written it down somewhere
> we shouldn't enforce any ordering for patch submitters.
ok.
by applying old patches, i made experience that "append as last in the
list" will mostly end as patch conflict in comparison to "add in
alphabetically ordered list". May it is worth to start this practice.
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-04-23 8:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 8:01 Gerd Pauli
2018-04-22 8:27 ` Oleksij Rempel
2018-04-23 8:13 ` Sascha Hauer
2018-04-23 8:33 ` Oleksij Rempel [this message]
2018-04-23 8:39 ` Sascha Hauer
2018-04-23 12:52 ` Gerd Pauli
2018-04-25 8:23 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8fbdaa19-13bc-9b27-7b69-ca3ca50872cf@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=gp@high-consulting.de \
--cc=linux@rempel-privat.de \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox