Subject: [cicm] Prototype CICM Implementation

From: "Novikov, Lev" <[email-masked]>
Date: Fri, 4 Mar 2011 16:38:49 -0500

As CICM has matured, there has been more interest in seeing CICM implementations. 
Given that IETF runs on "rough consensus and running code" attached is an initial 
C++ "Test Harness" which is a rough shell of an prototype CICM implementation.
(If we can get an IETF SVN repository set up, we'll move this code over there.)

We invite all crypto module developers to take a look at the harness and consider 
implementing it for their devices. Note that the harness is meant to demonstrate a 
tiny subset of CICM: just basic encryption and decryption with a symmetric key.

Here are the descriptions of the attached files:
config.h - macro definitions for configuration parameters (identifiers, payload, etc.)
cicm.h - header file for the test harness (includes references to the CICM specification)
cicm.cpp - the CICM implementation (stub code; implementation work goes here)
encrypt.cpp - the encrypt portion of the test harness
decrypt.cpp - the decrypt portion of the test harness
Makefile - for use with make (assumes g++ for the compiler; edit as needed)

The following is a quick summary of the test harness scenario.

Encrypt:
1. Retrieve the module with the id {as configured}.
2. Select the symmetric key manager.
3. Select the symmetric key with the id {as configured}.
4. Select the channel manager.
5. Create an encrypt channel that uses an algorithm {as configured}.
6. Use the channel to encrypt and send a payload {as configured}.

Decrypt:
(Steps 1 - 3 above)
7. Select the channel manager. (For this test, this is the same as Step 4 above).
8. Create a decrypt channel that uses the same algorithm {as configured in step 5}.
9. Block until ready to receive payload.
10. Verify that the result from step 9 is the same as the payload used in step 6.

Corrections to the test harness should be sent to the list.

Have a good weekend,
Lev

---

From: "Kevin W. Wall" <[email-masked]>
Date: Fri, 04 Mar 2011 08:13:03 -0500

> tiny subset of CICM: just basic encryption and decryption with a symmetric key.

Lev,

If you get this posted to an SVN repository (you could use Google Code or
SourceForge if permitted by IEEE policy), let me know the link and I'll
post it to a few of the cryptography mailing lists (Metzdowd.com and
Randombits.net) that I hang out on as well as on my security blog. Both
of the crypto mailing lists are moderated and have quite a few professional
cryptographers reading and posting to them.

Actually, it wouldn't have to be an SVN repository for that. Posting them
to any web page will do.

-kevin
-- 
Kevin W. Wall
"The most likely way for the world to be destroyed, most experts agree,
is by accident. That's where we come in; we're computer professionals.
We cause accidents."        -- Nathaniel Borenstein, co-creator of MIME

---

From: "Novikov, Lev" <[email-masked]>
Date: Mon, 7 Mar 2011 17:25:06 -0500

Kevin,

> cryptographers reading and posting to them.

Thank you for offering to spread the word. I've contacted some 
folks at IETF to get a repository working. If by COB tomorrow (2011-03-08) 
we can't get the IETF SVN repository working, we'll set something 
up at Google Code and I'll post the link here.

Thanks,
Lev

---

From: "Kevin W. Wall" <[email-masked]>
Date: Mon, 07 Mar 2011 08:12:21 -0500

> up at Google Code and I'll post the link here.

OK, Lev. Sounds good. And, I meant IETF, not IEEE. (Must be that
deep-seated grudge I hope against the IEEE for totally screwing up
WEP way back when. ;-)

-kevin

---

From: "Novikov, Lev" <[email-masked]>
Date: Tue, 8 Mar 2011 17:46:08 -0500

On 2011-03-07 17:25, Lev Novikov wrote:
> If by COB tomorrow (2011-03-08) we can't get the IETF SVN repository 
> working, we'll set something up at Google Code and I'll post the link here.

We now have a Google Code project at http://code.google.com/p/ietf-cicm/.
It uses mercurial <http://mercurial.selenic.com/>; windows users might be
interested in TortoiseHg <http://tortoisehg.bitbucket.org/> (similar to TortoiseSVN).

Checkout the code:
$ hg clone https://ietf-cicm.googlecode.com/hg/ ietf-cicm

Or view it online:
http://code.google.com/p/ietf-cicm/source/browse/#hg%2Fcpp

Technical issues should be brought up on the mailing list.

Lev

---

From: "Kevin W. Wall" <[email-masked]>
Date: Tue, 08 Mar 2011 04:44:11 -0500

Lev,

Two questions...
1) Mind if I post this two the crypto mailing lists I previously mentioned?
2) If answer to #1 is 'no', then how should people (mostly cryptographers;
   me, I just mostly lurk and occasionally ask questions ;) reply? I don't
   think they will want to subscribe to the mailing list just to post comments /
   feedback and secondly, I really don't want to have to be the middle-man
   in passing along their comments.

Thanks,
-kevin

On 03/08/2011 05:46 PM, Novikov, Lev wrote:
> _______________________________________________
> cicm mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cicm
>

---

From: "John Leiseboer" <[email-masked]>
Date: Wed, 9 Mar 2011 15:31:59 +1000

> We now have a Google Code project at
http://code.google.com/p/ietf-cicm/.
...
> Technical issues should be brought up on the mailing list.

$ make
g++ -Wall -Werror -o encrypt.exe encrypt.cpp
cc1plus: warnings being treated as errors
encrypt.cpp: In function 'int main()':
encrypt.cpp:15: error: deprecated conversion from string constant to
'char*'
encrypt.cpp:18: error: deprecated conversion from string constant to
'char*'
encrypt.cpp:22: error: deprecated conversion from string constant to
'char*'
encrypt.cpp:24: error: deprecated conversion from string constant to
'char*'
make: *** [encrypt] Error 1

$ gcc --version
gcc (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2)
Copyright (C) 2010 Free Software Foundation, Inc.

Easy enough to fix with casts in right places.

John Leiseboer

----------------------------------------------------------------
John Leiseboer                    QuintessenceLabs Pty Ltd
Chief Technology Officer          Suite 23, Physics Building #38
P: +61 7 5494 6740                Science Road
F: +61 2 6125 7180                Australian National University
M: +61 409 487 510                Acton, ACT 0200 Australia
mailto:[email-masked]    www.quintessencelabs.com
----------------------------------------------------------------

---

From: "Novikov, Lev" <[email-masked]>
Date: Wed, 9 Mar 2011 08:32:46 -0500

Kevin,

> 1) Mind if I post this two the crypto mailing lists I previously mentioned?

Please do. We want to get the word out.

>   in passing along their comments.

People who are not subscribed to the list can still email [email-masked] and 
we'll make sure to let their messages through here.

Thanks again,
Lev

---

From: "Novikov, Lev" <[email-masked]>
Date: Wed, 9 Mar 2011 09:08:35 -0500

John,

...
> Easy enough to fix with casts in right places.

Good call. Switched to a newer gcc and added those casts.
Repository is up to date.

Thanks,
Lev