All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Stockhausen <stockhausen@collogia.de>
To: Corentin LABBE <clabbe.montjoie@gmail.com>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Cc: "linux-sunxi@googlegroups.com" <linux-sunxi@googlegroups.com>
Subject: AW: problem with testing a CTR block cipher mode which is partially working
Date: Mon, 30 Mar 2015 18:08:28 +0000	[thread overview]
Message-ID: <12EF8D94C6F8734FB2FF37B9FBEDD1735FC8AB40@EXCHANGE.collogia.de> (raw)
In-Reply-To: <55198F14.1090902@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]

> Von: linux-crypto-owner@vger.kernel.org [linux-crypto-owner@vger.kernel.org]&quot; im Auftrag von &quot;Corentin LABBE [clabbe.montjoie@gmail.com]
> Gesendet: Montag, 30. März 2015 19:59
> An: linux-crypto@vger.kernel.org
> Cc: linux-sunxi@googlegroups.com
> Betreff: problem with testing a CTR block cipher mode which is partially working
> 
> hello
> 
> I am trying to add the CTR (counter) block cipher mode for AES on my Security System driver.
> 
> When testing with the tcrypt module I got the following result:
> [ 1256.986989] alg: skcipher: Test 1 failed on encryption for ctr-aes-sunxi-ss
> [ 1256.987004] 00000000: 87 4d 61 91 b6 20 e3 26 1b ef 68 64 99 0d b6 ce
> [ 1256.987013] 00000010: 40 94 25 91 d7 b4 4f 49 ab c1 9d 33 a4 4e f6 54
> [ 1256.987023] 00000020: ce 58 d2 f0 01 8f 92 a2 5f 2c bb 66 13 8b 9d 76
> [ 1256.987032] 00000030: 30 fa 4a 40 b1 67 2e f3 46 b7 9a 7c ba 91 0b a2
> 
> As you can see the first ciphered block is correct (according to testmgr.h), the subsequent blocks are bad.
> 
> So Could I assume that the setting of key and IV are good (at least for the first cipher pass.
> 
> The number of inputs(register) are limited and I have tested near all the possibility.
> Any idea of what could be wrong.
> 

had a similar challenge a few months ago. I had to take care about

- counter IV is big endian (implemented it little endian in first place)
- CTR allows to encrypt data that does not need to be amultiple of 16 bytes.

Markus

=

[-- Attachment #2: InterScan_Disclaimer.txt --]
[-- Type: text/plain, Size: 1650 bytes --]

****************************************************************************
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.

Über das Internet versandte E-Mails können unter fremden Namen erstellt oder
manipuliert werden. Deshalb ist diese als E-Mail verschickte Nachricht keine
rechtsverbindliche Willenserklärung.

Collogia
Unternehmensberatung AG
Ubierring 11
D-50678 Köln

Vorstand:
Kadir Akin
Dr. Michael Höhnerbach

Vorsitzender des Aufsichtsrates:
Hans Kristian Langva

Registergericht: Amtsgericht Köln
Registernummer: HRB 52 497

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

e-mails sent over the internet may have been written under a wrong name or
been manipulated. That is why this message sent as an e-mail is not a
legally binding declaration of intention.

Collogia
Unternehmensberatung AG
Ubierring 11
D-50678 Köln

executive board:
Kadir Akin
Dr. Michael Höhnerbach

President of the supervisory board:
Hans Kristian Langva

Registry office: district court Cologne
Register number: HRB 52 497

****************************************************************************

  reply	other threads:[~2015-03-30 18:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 17:59 problem with testing a CTR block cipher mode which is partially working Corentin LABBE
2015-03-30 18:08 ` Markus Stockhausen [this message]
2015-03-30 19:11   ` AW: " Stephan Mueller
     [not found]   ` <12EF8D94C6F8734FB2FF37B9FBEDD1735FC8AB40-Xnr6BND5kcg29+KCeZIpYi5l6jQMEky5@public.gmane.org>
2015-03-31 18:02     ` Corentin LABBE
2015-04-01  2:06       ` kevin.z.m.zh-Re5JQEeQqe8AvxtiuMwx3w
2015-04-01 11:16         ` [linux-sunxi] " Corentin LABBE
2015-04-02  2:10           ` kevin.z.m.zh-Re5JQEeQqe8AvxtiuMwx3w
     [not found]             ` <2015040210102714744761-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-02 19:02               ` Corentin LABBE

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=12EF8D94C6F8734FB2FF37B9FBEDD1735FC8AB40@EXCHANGE.collogia.de \
    --to=stockhausen@collogia.de \
    --cc=clabbe.montjoie@gmail.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.