From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23016 invoked by alias); 28 Mar 2014 09:34:40 -0000 Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org Received: (qmail 22996 invoked by uid 89); 28 Mar 2014 09:34:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_00,KAM_BODY_URIBL_PCCC,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail.ecoscentric.com Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 28 Mar 2014 09:34:38 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 6F0FA468000A for ; Fri, 28 Mar 2014 09:34:34 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nObDyXfGHhdR; Fri, 28 Mar 2014 09:34:25 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001962] New: Port of CyaSSL TLS library 2.9.0 Date: Fri, 28 Mar 2014 09:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: daniel.zebralla@arcor.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg00020.txt.bz2 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001962 Bug ID: 1001962 Summary: Port of CyaSSL TLS library 2.9.0 Product: eCos Version: unknown Target: All Architecture/Host Other OS: Status: UNCONFIRMED Severity: enhancement Priority: low Component: Patches and contributions Assignee: unassigned@bugs.ecos.sourceware.org Reporter: daniel.zebralla@arcor.de CC: ecos-patches@ecos.sourceware.org Created attachment 2493 --> http://bugs.ecos.sourceware.org/attachment.cgi?id=2493&action=edit Port of CyaSSL 2.9.0 TLS library to eCos I did a port of the CyaSSL TLS library [1] version 2.9.0 by WolfSSL to eCos. The library itself is attached as "cyassl_ecos_port.zip". The port was done using a Windows 7 system with an Cygwin 32-Bit environment. The target system is a Freescale MPC5668G processor (PowerPC architecture). What WAS tested: * TLS 1.2 connections with ECC using adjusted example programs 'client' and 'server' with MCP5668 <-> MPC5668, MPC5668 <-> Laptop (CyaSSL client/server), MPC5668 <-> Laptop (OpenSSL client/server) * Test-suite (automatically tests SSL 3.0, TLS 1.0, TLS 1.1 and TLS 1.2 with various Cipher-Suites by starting a separate server thread and connecting with the test client), API-Tests, benchmark example * Loading certificates from a mounted (JFFS2) filesystem * Loading certificates from memory buffers * OCSP * fastmath library was used most of the time * Blocking and non-blocking I/O (non-blocking realized via ioctl rather than fcntl [2]) * Using FreeBSD stack as the network stack What WAS NOT tested: * 'echoclient' and 'echoserver' examples were never used and thus not adjusted for usage on eCos * Hardware acceleration * NTRU, Rabbit * Certificate generation * CRLs * Using OpenBSD as the network stack As there were quite some test programs, I decided to put the tests into a separate eCos application, attached as "cyassl_ecos_examples.zip". I mostly could utilize the provided POSIX function calls because of the POSIX abstraction layer in eCos. The port most definitely will NOT work without this! As to some numbers I've taken: * static TLS library size for my use case (IPv6-support, TLS1.2 with ECC, OCSP): ~120 kBytes without optimization, ~75 kBytes with -Os * stack usage (mostly the same as client or server): ~15 kBytes during TLS handshake using a 28 kBytes stack. ~3 kBytes during communication on an established TLS connection * Dynamic memory consumption peaks at ~32 kBytes Compiler optimization -O2 also greatly speeds up processing. IANAL, so I wasn't sure whether I can simply include the eCos license header to all files or the CyaSSL license header has to stay. CyaSSL is licensed under GPLv2 or alternatively under a commercial license. I also sent this port back to WolfSSL for cleanup and integration. As I'm about to finish my work here, I will NOT be able to get my hands on a MPC5668 again anytime soon. [1] http://www.yassl.com/yaSSL/Products-cyassl.html [2] http://cygwin.com/ml/ecos-discuss/2012-01/msg00051.html Kind regards - Daniel Zebralla -- You are receiving this mail because: You are on the CC list for the bug.