Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > PLEASE HELP - How do I include OpenSSL in my code?

Reply
Thread Tools

PLEASE HELP - How do I include OpenSSL in my code?

 
 
Richard Heathfield
Guest
Posts: n/a
 
      05-14-2006
Andrew Poelstra said:

> On 2006-05-13, Richard Heathfield <> wrote:
>
>> And in any case, inventing a reasonably secure cryptosystem is, frankly,
>> trivial. The tricky bit is not the "technology" if that's the word, but
>> the usage - a great many ciphers are cracked not because they are
>> inherently weak but because they are misused.
>>

> True; of course, most people who hear that believe that ciphertext[i] =
> plaintext[i] ^ 5 is a "reasonably secure cryptosystem".


And so it is, provided nobody actually tries to crack it (which, again, is
true of most cryptosystems!).

When people do try to roll their own, it is sometimes embarrassing to see
just how quickly they can be broken. A guy I used to work with came up with
what he thought was an uncrackably complex scheme. He had spent several
days designing it. He gave me no algorithm, just some ciphertext, and it
took me about ten minutes. <sigh>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
 
Reply With Quote
 
 
 
 
Clever Monkey
Guest
Posts: n/a
 
      05-15-2006
Martin Ambuhl wrote:
> wrote:
>> Could some C guru please help me? I have a simple piece of code as:
>>
>> #include <stdio.h>
>> #include <stdlib.h>
>> #include <openssl/rand.h>

>
> You're trying to get us into trouble, aren't you. Even if openssl were
> on topic here, or if your implementation-specific question were on
> topic, the language from the openssl site would scre me off:
>> PLEASE REMEMBER THAT EXPORT/IMPORT AND/OR USE OF STRONG CRYPTOGRAPHY
>> SOFTWARE, PROVIDING CRYPTOGRAPHY HOOKS OR EVEN JUST COMMUNICATING
>> TECHNICAL DETAILS ABOUT CRYPTOGRAPHY SOFTWARE IS ILLEGAL IN SOME
>> PARTS OF THE WORLD. SO, WHEN YOU IMPORT THIS PACKAGE TO YOUR COUNTRY,
>> RE-DISTRIBUTE IT FROM THERE OR EVEN JUST EMAIL TECHNICAL SUGGESTIONS
>> OR EVEN SOURCE PATCHES TO THE AUTHOR OR OTHER PEOPLE YOU ARE STRONGLY
>> ADVISED TO PAY CLOSE ATTENTION TO ANY EXPORT/IMPORT AND/OR USE LAWS
>> WHICH APPLY TO YOU. THE AUTHORS OF OPENSSL ARE NOT LIABLE FOR ANY
>> VIOLATIONS YOU MAKE HERE. SO BE CAREFUL, IT IS YOUR RESPONSIBILITY.


Why is this scary? It's just a typical "you cannot sue us" extension of
the BSD license. In reality there are only a few countries where this
would be a problem. A hint is that OpenSSL development having to do
with encryption is not done in those countries (and therefore, not
subject to export law). They ship from those countries "because they
can" (quote from the OpenSSL website).

Even in the US, as long as you do not export the software you write
based on strong crypto like OpenSSL you should be fine. It is not
illegal to code (yet). Most export laws are triggered once you try to
sell or provide software based on such tech to another country or agent
of another country.

However, the laws regarding such material are byzantine and subject to
broad interpretation. This warning is a just a YMMV.
 
Reply With Quote
 
 
 
 
Martin Ambuhl
Guest
Posts: n/a
 
      05-15-2006
Clever Monkey wrote:

> Why is this scary? It's just a typical "you cannot sue us" extension of

How about this:
>>> OR EVEN JUST EMAIL TECHNICAL SUGGESTIONS

> the BSD license.


The BSD license is irrelevant. We have a government in the US that is
technically challenged (so they don't understand the pointlessness of
these attempts to control information about cryptology) and with a will
to arrest on the slightest provocation.

> In reality there are only a few countries where this
> would be a problem.


"A few countries" are a serious problem with an uncontrolled medium like
a newsgroup.

> Even in the US, as long as you do not export the software you write
> based on strong crypto like OpenSSL you should be fine. It is not
> illegal to code (yet).


Please don't offer legal advice unless you are willing to be sued should
it go wrong. The original poster asked for technical suggestions. Are
you willing to bet your freedom and property that the government will
not come after people who answer him? Are you willing to bet your
freedom and property that this newsgroup does not reach those "few
countries" in which this could be a problem.


 
Reply With Quote
 
Malcolm
Guest
Posts: n/a
 
      05-17-2006
"Richard Heathfield" <> wrote in message
>> True; of course, most people who hear that believe that ciphertext[i] =
>> plaintext[i] ^ 5 is a "reasonably secure cryptosystem".

>
> And so it is, provided nobody actually tries to crack it (which, again, is
> true of most cryptosystems!).
>
> When people do try to roll their own, it is sometimes embarrassing to see
> just how quickly they can be broken. A guy I used to work with came up
> with
> what he thought was an uncrackably complex scheme. He had spent several
> days designing it. He gave me no algorithm, just some ciphertext, and it
> took me about ten minutes. <sigh>
>

But if you are scanning every email sent in the country, for the string "Mr
Vladimir orders three quarts of cheese", then those ten minutes are
prohibitive.
--
www.personal.leeds.ac.uk/~bgy1mm




 
Reply With Quote
 
Andrew Poelstra
Guest
Posts: n/a
 
      05-18-2006
On 2006-05-17, Malcolm <> wrote:
> "Richard Heathfield" <> wrote in message
>>> True; of course, most people who hear that believe that ciphertext[i] =
>>> plaintext[i] ^ 5 is a "reasonably secure cryptosystem".

>>
>> And so it is, provided nobody actually tries to crack it (which, again, is
>> true of most cryptosystems!).
>>
>> When people do try to roll their own, it is sometimes embarrassing to see
>> just how quickly they can be broken. A guy I used to work with came up
>> with
>> what he thought was an uncrackably complex scheme. He had spent several
>> days designing it. He gave me no algorithm, just some ciphertext, and it
>> took me about ten minutes. <sigh>
>>

> But if you are scanning every email sent in the country, for the string "Mr
> Vladimir orders three quarts of cheese", then those ten minutes are
> prohibitive.

Don't cut attribution lines; it took me five minutes to figure out that I
had made the post Richard replied to.

Once you crack a message, you can figure out the algorithm, and from there it
no longer takes 10 minutes per message.

--

Andrew Poelstra < http://www.wpsoftware.net/blog >
 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      05-18-2006
Malcolm said:

> "Richard Heathfield" <> wrote in message
>>> True; of course, most people who hear that believe that ciphertext[i] =
>>> plaintext[i] ^ 5 is a "reasonably secure cryptosystem".

>>
>> And so it is, provided nobody actually tries to crack it (which, again,
>> is true of most cryptosystems!).
>>
>> When people do try to roll their own, it is sometimes embarrassing to see
>> just how quickly they can be broken. A guy I used to work with came up
>> with
>> what he thought was an uncrackably complex scheme. He had spent several
>> days designing it. He gave me no algorithm, just some ciphertext, and it
>> took me about ten minutes. <sigh>
>>

> But if you are scanning every email sent in the country, for the string
> "Mr Vladimir orders three quarts of cheese", then those ten minutes are
> prohibitive.


Yes, but this was (almost) twenty years ago, by hand. With a computer, it
would have taken approximately three xesoseconds[1] to crack the code -
which, despite all its superficial complexity, was a mono.

Two common mistakes made by bozocryptographers are:

(1) they think that, to get the plaintext, the cryppies are required to
reverse-engineer the actual (secret) cryptosystem devised by the
cryptographer;
(2) they don't realise that two (or even a great many more than two)
substitution schemes are basically the same as one substitution scheme and
can be solved as if they were one.

Well, it was almost twenty years ago, so I think I've known enough Andrews
that I can call the guy Andrew (his real name) without fear of embarrassing
him. What Andrew had done was to set up a monoalphabetic substitution
cipher (A = R, B = K, C = Z, whatever). He had then replaced each letter by
an entire word beginning with that letter. He then replaced the word by a
picture representing the word. And he then replaced the picture by a
four-digit number. He thought there was no way I'd be able to even guess
that pictures were involved (which was true!), and that therefore I would
be unable to decipher the message (which was not!).



[1] abbrev for "oneofthosenewfangledprefixesoseconds"

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
 
Reply With Quote
 
Jordan Abel
Guest
Posts: n/a
 
      05-18-2006
On 2006-05-18, Andrew Poelstra <> wrote:
> On 2006-05-17, Malcolm <> wrote:
>> "Richard Heathfield" <> wrote in message
>>>> True; of course, most people who hear that believe that ciphertext[i] =
>>>> plaintext[i] ^ 5 is a "reasonably secure cryptosystem".
>>>
>>> And so it is, provided nobody actually tries to crack it (which, again, is
>>> true of most cryptosystems!).
>>>
>>> When people do try to roll their own, it is sometimes embarrassing to see
>>> just how quickly they can be broken. A guy I used to work with came up
>>> with
>>> what he thought was an uncrackably complex scheme. He had spent several
>>> days designing it. He gave me no algorithm, just some ciphertext, and it
>>> took me about ten minutes. <sigh>
>>>

>> But if you are scanning every email sent in the country, for the string "Mr
>> Vladimir orders three quarts of cheese", then those ten minutes are
>> prohibitive.

> Don't cut attribution lines; it took me five minutes to figure out that I
> had made the post Richard replied to.
>
> Once you crack a message, you can figure out the algorithm, and from there it
> no longer takes 10 minutes per message.


Assuming the secret is also the same for all the other messages - an
algorithm on its own buys you very little.
 
Reply With Quote
 
Old Wolf
Guest
Posts: n/a
 
      05-19-2006
Richard Heathfield wrote:
> When people do try to roll their own, it is sometimes embarrassing to see
> just how quickly they can be broken. A guy I used to work with came up with
> what he thought was an uncrackably complex scheme. He had spent several
> days designing it. He gave me no algorithm, just some ciphertext, and it
> took me about ten minutes. <sigh>


But you are a genius. See:
http://groups.google.com/group/comp....05e5d339edec01

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Ruby and OpenSSL: no such file to load -- openssl (RuntimeError) Redd Vinylene Ruby 6 11-18-2008 08:51 AM
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
help please - openssl and ruby Chris Catton Ruby 2 12-31-2006 02:29 PM
please help... ...me learn C++ please please please :) KK C++ 2 10-14-2003 02:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57