Re: Avoiding C++ Templates In Cipher Implementation

From: David Hopwood (david.hopwood_at_zetnet.co.uk)
Date: 06/09/03


Date: Mon, 09 Jun 2003 04:31:07 +0000


-----BEGIN PGP SIGNED MESSAGE-----

Brian Gladman wrote:
> "Russ Lyttle" <lyttlec@earthlink.net> wrote:
> [snip]
> > Code I write often must meet some combination of the following 3
> > requirements. : (1) It must be easy to maintain; (2) It must be proven
> > correct; or (3) it must be secure. Pick two.
> > (1) requires readable source and easily debugged execuitables. That means
> > any one can reverse engineer the object code. Thus less (3).
> > Templates make it difficult to meet requirement (2) even though they help
> > lots for meeting (1).
> > The crypto I do has (3) more important than (2) and often does not have to
> > meet (1) at all. The crypto algorithm must be correct.
>
> So you are happy to have incorrect code as long as it is secure?
>
> I personally doubt that (3) is achievable in the absense of (2) since
> assurance of security to a certain standard of proof will require proof of
> correctness to at least the same standard.

Correctness implies security (why would anyone consider an insecure system
to be correct?), but security does not imply correctness. For example, suppose
we have a system that should always produce a result, such that we can easily
demonstrate that it *either* produces a correct result or reports failure.
However, demonstrating that there is no input for which it can fail may be
very difficult. Provided that failure is reported in a secure way, and provided
that an attacker cannot influence whether the system fails, there is no reason
why we should not consider it to be secure.

I agree completely with Ernst Lippe's conclusion, though:

# I am absolutely convinced that readable source code is
# essential for all three requirements. If it is unreadable
# it is unmaintainable. If it is unreadable, how are you going
# to prove that it is correct? If you can't prove that it
# is correct why should you believe that it is secure?

More directly, if it is unreadable then it is unlikely we can demonstrate
to any useful degree of confidence that it is secure, regardless of whether
or not it is correct. ("Proof" is rarely possible and rarely required.)

> > Crypto devices should have lots of anti-tampering mechanisms. This is only
> > one.
>
> This might be a requirement but it will not always be necessary.

Agreed.

- --
David Hopwood <david.hopwood@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPuQNgjkCAxeYt5gVAQFFHQf7B980JY0e1rlTglF7Gzi7dePdHJWZ099x
y9KjS9EJ10WtZQRhlV0zMdljLQ/iN2+snZNk55vAmdjngct1HdQaACJgzlSJCtV1
UV499gQFq4+uzxh8o9u4qvmUl/m50qxKvSnTjWRiaIWh6Up2T4PPKSG8/lLIgKTu
O1dEFb9U0SSt7/IMcEJWbFdTyuKjl5iF3EFF+0wjBjaqc3hx5xU82SEVORzmTFs9
FcL/b0N9/qAogdP1YSkLQ0mW1LaaL78R/h3EILs9qwnD9/+/m3TS7lp8yESHC1z7
FO9jaJrLnTz1JiEe2/2ppbWBNVnBofIJLOJukz/T5ONinMgp6n1UNA==
=mLRm
-----END PGP SIGNATURE-----



Relevant Pages

  • Re: How secure is software X?
    ... in my opinion a software can either be secure or not secure. ... to classify security like that would be to condemn every ... How in-depth a fuzzing to we apply for this standard? ... For example, SMTP servers have a pretty standard interface, ...
    (Bugtraq)
  • Re: Ten least secure programs
    ... it's probably better you leave the topic alone ... I said I do not have security issues with the programs I code. ... I didn't realize you were a Linux user, ... > the most widely used and secure UNIX flavors? ...
    (Security-Basics)
  • "An Asp.Net accident waiting to happen" - Draft article
    ... In a time where Security ... in shared hosting environments. ... technologies that allow the creation and deployment of secure ... IIS 6 web server and windows 2003 also provide some tools to deploy ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Why Easy To Use Software Is Putting You At Risk
    ... I do agree that the additions and changes to Solarius will make it more secure and that this is good. ... Why Easy To Use Software Is Putting You At Risk ... instead I would say that the view that security is ... Four Construction Workers Died after Crane Collapse in Toledo, ...
    (Security-Basics)
  • Why Easy To Use Software Is Putting You At Risk
    ... Anyone who has been working with computers for a long time will have noticed ... because DNS does not configure properly or security permissions are relaxed ... Is It Also Secure ... guarantee that no one really knows for sure, not even Microsoft developers. ...
    (Security-Basics)