Help: handling "byte/char arrays"?

12 views
Skip to first unread message

siegfried rohrendorf

unread,
Feb 25, 2003, 11:31:45 AM2/25/03
to crypto...@eskimo.com
Replacing "FileSource" with "StringSource" works well
in all cases where the File stores exactly one string
(this is true for all? sort of keys and signatures
(that i use)).

is there a simple way to replace FileSource to handle
char arrays (including 0x00 chars)?

example:
VerifierFilter *verifierFilter = new
VerifierFilter(pub);
verifierFilter->Put(signature, pub.SignatureLength());
//FileSource f(messageFilename, true, verifierFilter);
StringSource f(messageString, true, verifierFilter);

using StringSource works with real strings, but the
messageString is MAC-encrypted (means having 0x00
chars in it).

thanks a lot for any advice

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Bis zu 100 MB Speicher bei http://premiummail.yahoo.de

Michael Hunley

unread,
Feb 26, 2003, 2:25:10 AM2/26/03
to crypto...@eskimo.com
If you know the size ahead of time (even a conservatively large estimate
of), then you can use ArraySource. I'm pretty green on using those
aspects, so I imagine someone else in the community may have a better
suggestion.

michael

Wei Dai

unread,
Feb 26, 2003, 2:32:22 AM2/26/03
to crypto...@eskimo.com
There is no such thing as ArraySource, only ArraySink. However
StringSource has a second constructor which takes a byte * and a length.
Use that if your string may have a '\0' in the middle. BTW, I just
answered this same question a few days ago. Please check the archives
before asking questions in the future.

Marshall Clow

unread,
Feb 27, 2003, 1:24:16 PM2/27/03
to crypto...@eskimo.com
>SAN DIEGO -- February 27, 2003 -- In an initiative designed to benefit the telecommunications industry and the general public, QUALCOMM Incorporated (Nasdaq: QCOM), pioneer and world leader of Code Division Multiple Access (CDMA) digital wireless technology, today announced that it will allow free use of its SOBER and Turing encryption algorithms for any purpose. In the past, QUALCOMM provided the encryption software only to its licensed manufacturers or for non-commercial use.
>
>Turing and the SOBER family are high-speed, highly secure stream ciphers and are thought to be immune to any practical cryptanalytic attacks.

[ ObDisclaimer: I am now a Qualcomm employee, but I didn't work on this. ]
--
-- Marshall

Marshall Clow Idio Software <mailto:mars...@idio.com>
Hey! Who messed with my anti-paranoia shot?

Wei Dai

unread,
Feb 27, 2003, 3:14:07 PM2/27/03
to crypto...@eskimo.com
That is good news, because we're sorely lacking in free high speed stream
ciphers. And 50% faster than RC4 is pretty impressive. Unfortunately the
source code copyright license states:

4. The software is not embedded in a device intended for a specific
application, for example but not limited to communication devices
(including mobile telephones), smart cards, cash registers, teller
machines, network routers.

So I guess it'll have to wait until I have time to reimplement the cipher.

Reply all
Reply to author
Forward
0 new messages