Re: Release 1.1 (beta) of my AES implementation
From: Mok-Kong Shen (mok-kong.shen_at_t-online.de)
Date: 06/25/03
- Next message: Mok-Kong Shen: "Re: Release 1.1 (beta) of my AES implementation"
- Previous message: Anton Stiglic: "Re: Using information about phi(n) to factor n"
- In reply to: Tom St Denis: "Re: Release 1.1 (beta) of my AES implementation"
- Next in thread: Tom St Denis: "Re: Release 1.1 (beta) of my AES implementation"
- Reply: Tom St Denis: "Re: Release 1.1 (beta) of my AES implementation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 25 Jun 2003 18:28:12 +0200
Tom St Denis wrote:
>
[snip]
> Now imagine using your style of coding in a project 10 tims bigger than
> LTM....
I have only my humble code in mind. I think a candidate
application would invoke in main or a routine the
encryption/decrption functions. If that routine is
used in wide scale, it could be compiled (its source
would include my code). There is thus only a single
point referencing my code. So the include mechanism
is sufficient and o.k. in my opinion.
>
> >Or am I missing something?
>
> Yeah, post secondary education in computer science....
>
> That being said... imagine this case
>
> - one application
> - splits into two threads both use AES
> - both threads share memory space
>
> This is common, specially for your beloved win32 platform [as a note of
> interest threads are not common in unix and are emulated in Linux].
> Applications which may need to handle more than one connection [e.g.
> sockets] or handle bi-directional pipes, etc...
>
> Sure, if you intend to write single thread applications only then your
> approach works fine.
>
> My point though, is why limit yourself out of the gate? You should
> always try to write the best code you can [e.g. as portable as can be,
> as thread safe as can be, as flexible as can be, etc...].
>
> If you cripple your code out of the gate then it can only really go
> downhill from there. And to be honest "good" coding style doesn't
> involve a lot of work when you are in the habit of doing it. Makefiles
> are simple to write, proper code factoring [e.g. no code in headers] is
> simple to do, writing thread safe routines is fairly trivial, etc...
>
> You asked for comments on your code. I'm giving you the dime tour of
> what a high school grad knows in CS. Imagine if a real pro actually
> replied... whoa...
If the program does fork like you described, then the
entire code piece
read a block from input file to aesin;
aesprocess();
write aesout to output file;
would need to be protected because of concurrency. So
the programmer has to do something anyway (modifications
in the sense I mentioned in the copyright notice).
M. K. Shen
- Next message: Mok-Kong Shen: "Re: Release 1.1 (beta) of my AES implementation"
- Previous message: Anton Stiglic: "Re: Using information about phi(n) to factor n"
- In reply to: Tom St Denis: "Re: Release 1.1 (beta) of my AES implementation"
- Next in thread: Tom St Denis: "Re: Release 1.1 (beta) of my AES implementation"
- Reply: Tom St Denis: "Re: Release 1.1 (beta) of my AES implementation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|