« first day (627 days earlier)      last day (4551 days later) » 
00:00 - 21:0021:00 - 00:00

00:00
@ScottPack it happens :-)
@AndrewSmith I would argue that C is nonetheless still more universal than PHP. And arguably safer. And definitely better designed. C may give you enough rope, but PHP ties it around your neck.
My favourite quote from one of the other chat rooms:
> WTF Google Images, I never asked for a picture of a dolphin lying on the sand with its innards visibly coming out
@tylerl yep - you can secure most languages, but it's the effort trade-off. php is just a pain in the neck to make sure it is secure.
00:15
@RoryAlsop One of the probably easiest ways to secure PHP is to implement a Lisp interpretor in PHP, and then code in Lisp.
2
 
4 hours later…
 
2 hours later…
06:52
@ThomasPornin arguably even easier, is to switch to Java or .NET.
or even Ruby, for that matter.
07:13
Well I think it's harder to produce secure c code than it is to produce secure php
@CodesInChaos absolutely true, but the reason for that is tricky:
with C, it is much harder to know how secure you are, or aren't.
with PHP it is much easier to find most of the secbugs.
"producing secure X code" doesnt mean much if you cannot measure it, and it is staggeringly difficult to measure the security of C code.
2
07:35
flagged anyway, but figured I should poke you since you're around.
like it
@Polynomial can i ask question regarding reverseengineering in security.se?
depends on what you want to reverse engineer.
we allow such questions as long as they're about security.
but if it's about breaking copyright protection or cracking commercial apps, then no.
@AviD However, it is possible to measure the security of C code as long as you stick to a certain model. That's how the CLR works in C#.
they have a whole set of mathematical and logical proofs that code produced by the CLR's JIT compiler is type-safe, which ultimately implies that there can be no buffer overflows and such.
doesn't mean the security model built on top of it is safe, but the code is type-safe at least.
which is a huge achievement, imo.
cryptography and stenography same or diffrent?
completely different.
and it's steganography, btw.
oh, wait, it's not.
embarrassed now. I've been using that word wrong.
wrong?
07:42
oh, wait, no, I'm right.
i belive you in most of things and i trust you wont be wrong
steganography is about hiding messages in plain sight. stenography is an old writing style.
ohh i asked stenography question once but i cant get answer
cryptography comes from the greek for "hidden secret" and "writing". so it's about making a message impossible to understand or read, even if an attacker is looking right at it.
steganography is about hiding messages such that an attacker wouldn't notice the message is even there.
so steganography is a security-through-obscurity method, but it can be quite useful.
@Polynomial where did you live i ll come for private tution to you
07:46
haha, yeah that's not gonna happen :P
why?
I don't give out my address to random people on the internet.
trust me,if its possible i can trace your address through your ip!
Well, for a start you don't know my IP, and secondly you'd just find my work's VPN.
but anyway.
also, you'd only find the local exchange.
which covers about ~18,000 houses around here.
@Polynomial anyway you are an good teacher accept me as your student
07:50
@Polynomial wasnt, but sure
@Polynomial thats a hmm...
@avid is it possible to find one's ip through chat
I'm not sure its just about crypto algos, it is also implementation, which would be ontopic.
anyway we'd need to ask the crypto mods - e.g. @ThomasPornin
@ThomasPornin see above security.stackexchange.com/q/19669/33 for crypto?
@AviD I think that the part he's really interested in would be better discussed on Crypto.SE, but asking the crypto mods would be best, yeah.
I'm also not sure its a great q the way it stands.
@vignesh There's a trick with images, which will give you every IP address of people in chat, but you won't know whose IP is whose.
07:52
it's almost TL.
@vignesh not directly, no. unless you're a mod.
@Polynomial in chat, reading the transcripts, etc
@AviD If the question were strictly about homomorphic key management, then I'd say it's a great question for Crypto.SE
it looks like the rest is just cruft around what he really wants to know about.
@Polynomial that's my point. C does not stick to any certain model, very much not.
@Polynomial why its not possible to find anyone's ip throgh chat
@vignesh what's your IP?
w00T! SE FTW!!
07:55
192.168.0.17
@AviD Sure, but it's possible to enforce certain security proofs if you adhere to a strict model.
@Polynomial that's a very big IF you have there.
@AviD My point is that in the CLR model, the C is computer generated, not human generated.
as such they can and do enforce such proofs.
it's actually C++, I believe, but same difference.
whoa. CLR model and C dont often get seen together??
@Polynomial ahh, now I understand.
you're talking about something else.
yeah, you're talking about enforcing security on generic C code, I'm talking about enforcing type-safety on generated C++ code.
07:58
and the C++ that is supported with CLR is really a variant of C++, and a much more secure one at that.
@Polynomial and generated CLR C++ code, at that.
absolutely different.
no, the CLR generates standard MSVC++.
but you can use C++.NET which is a language built on top of the CLR.
and, a big reason why, if you need to write C or C++ code, you're better off with Managed C++
kinda. I think at that point, just stick with C#.
@Polynomial dude, it looks like your buddy hacked your account.
I'd expect better from you... ;-)
@AviD Orly?
what account?
07:59
the CLR does not generate standard MSVC++.
there are so many things wrong with that!
@AviD Well, the JIT.
the CLR emits CIL.
I'm assuming you mean that .NET compiled assemblies are in VC++.
no, .NET assemblies are IL.
@Polynomial MSIL, but yeah.
@AviD CIL now.
08:00
but thats not VC++.
MSIL was the original name.
I know.
@Polynomial oh oops. Okay, I'll grant you that.
so here's how it works (full version)
the .NET framework and its libraries are written entirely in CIL.
right, so I'm sure I'm not understanding you meaning what I think you're saying.
but the JIT and CLR are two separate entities.
the CLR is all the frameworky parts.
08:01
yes.
the JIT is what converts CIL to native code.
so all of your functions, even the stuff inside the .NET framework, are just .NET CIL code.
(nitpick: they dont call it JIT, they use ngen... )
yeah, but still, it's a JIT compiler.
ngen is just their version :P
@Polynomial not completely accurate, but it is correct at deployment. After that they get ngened (or JITted) and cached.
08:03
@Polynomial yes yes, I said its just a nitpick :)
but the code emitted by the JIT is actually based on C++.
@Polynomial C++ is not native code!!
I know, give me a minute
the way they designed CIL is so they can represent all opcodes as routines in C++.
each opcode's routine has been vetted using a set of proofs, so that type safety can be enforced.
those routines are C++.
but for a multitude of reasons, it'd be kinda dumb to emit C++ from CIL.
@Polynomial no, they're MSIL.
sorry, CIL.
@AviD no, they're not. they cannot possible be.
otherwise you'd never compile to native.
CIL instructions are represented by C++ routines.
08:05
so again I missed what you're saying.
so you go from C# to CIL to native.
partly cuz my wife is standing here waiting for me to go furniture shopping with her.
but the native routines that CIL emits are actually just code emitted from the C++ compiler.
write it down, I'll comment when I get back :)
i love to watch your conversation and try to grasp something
08:06
ok
I'll pastebin it, for brevity.
@Polynomial are you free now can i ask you now
just ask questions. there's no need to ask to ask.
there were several articles stating that how to trace email and is it really possible to trace emails without any tools?
@Polynomial forgive me if i asked anything wrong
sure, just check the full headers
and anotherthing spyware and malware similar or diffrent,please dont ignore me since i hope to learn basics first
08:12
malware is any software that has malicious intentions.
@vignesh A lot of these questions are wikipedia'able or google'able
spyware is a type of software that steals your private information, so it's a type of malware.
agreed
for terms or meanings of words, google is your friend
google is your friend! :)
heh
i wonder why all people recommend me google any other search engines for hackers?
i hate google since it steals my privace
08:14
because a basic search can usually solve most of your questions
and Google is fine if you disable cookies, or use Tor.
@Polynomial i agree
but "google is your friend" is just another way of saying "your question could easily be answered by doing a quick web search".
it's just that Google is the most obvious choice.
sure @Polynomial i change my thoughts from now
08:33
@Polynomial LOL
so - the final week of competition now, and the topic is smartphones and mobile devices - anything in these tags: , , , and
cool. shall think some things up.
08:52
watcha all :)
@RoryMcCune morning guv'nor
(With apologies to Rory A) two days to 44con, woo :)
I'd imagine you could have the odd bit on mobile :-)
@RoryMcCune yeah thanks
@Poly - heh, you broken your laptop? security.stackexchange.com/q/19665/485
@RoryAlsop Nope, was just interested in how secure the BIOS password mechanism is.
09:18
Hi there!
hey
@Polynomial woah you found quite a fan. :P
How are you @Terry?
@TerryChia Indeed :/
@M'vy pretty good. :)
44con this week! :D
09:21
@Polynomial Well, whenever attacker has complete physical access to a machine, you're screwed.
@M'vy Unless they're trying to be covert, and don't have the skills/tools to put together a hardware backdoor.
anyhoo, work to do
laters
See you
09:45
@M'vy hi
and hi @TerryChia
Hey @roryA
 
5 hours later…
14:33
@RoryAlsop should be on this list: cracked.com/…
2
14:43
@Polynomial I don't think that's true anymore. Converting opcodes (in CIL or a concrete CPU, doesn't change a thing) by stringing code snippets obtained from compiling C or C++ code is a viable strategy (that's what QEMU does) but it is limited with regards to optimization.
@ThomasPornin Yeah, there's a bit more to it, but I've got a longer explanation that I'll sort out later.
As far as I know, the recent .NET VM implementations from Microsoft produce native opcodes directly, with local optimizations as a C/C++ compiler would do.
but the basic concept is that the equivilent C++ is provably type-safe.
anyway, work to do!
So, possibly, these VM may produce code in an intermediate representation (not CIL, something lower-level) which could be compatible with what Visual C++ produces when translating C++ code -- so that the optimizer back-end could be shared.
Mono can do that. It can use LLVM as backend, just like the C++ compiler Clang
14:46
There is no guarantee that there is equivalent C++ code, though. If only because the type system of CLI and that of C++ are quite distinct (e.g. C++ has multiple inheritance, CLI has not).
@CodesInChaos Yes, exactly.
The main thing that normal C++ lacks in this context is the GC
The GC is an essential part of .net's safety
It is possible to make a VM which converts CLI to C code (I have done it with Java bytecode) but that's specialized C code, which is bound to be quite ugly, and interactions with the GC are a bugger.
Because it makes sure you can't access a freed pointer
While you can go c++ with boehm, that's really ugly
As I often say, not only does the GC offer safety with regards to dangling pointers, but it also allows efficient handling of immutable character strings, which removes most of the situations where C/C++ programmers commit buffer overruns.
Personally I'm a fan of safety by default, but allowing the user a way to sacrifice safety for performance in the few places where it's necessary
Unfortunately MS's .net implementation doesn't really support that
14:53
@CodesInChaos A properly tuned GC can improve cache locality by moving objects around in RAM (it requires precise identification of pointers, so as to transparently update them), so it can boost performance.
For the rest, I tend to consider that offering an interface to native code (in C, assembly, whatever) is sufficient for the most time-critical jobs.
One big problem with MS's implementation is that their JITter is very limited, and can't compete against LLVM or GCC
And the second is that there are many functions you can't really express well in .net, because it's lacking the required intrinsics
Another problem with JIT is that it does not work well with small embedded systems, which have very little RAM (but can have substantial ROM/Flash).
For example rotations, bitscans, 64 bit multiplications, SSE
Mono supports ahead of time compilation. But of course a large part of the runtime remains
@CodesInChaos For rotations, you can use a two-shifts-and-or function, which the (JIT) compiler will recognize -- C compilers have done so for at least a decade, it is not that hard.
Didn't get around to testing that part yet.
14:57
@CodesInChaos Java and .NET are not fundamentally hostile to embedded systems, but the core implementations (from Sun/Oracle or Microsoft or Mono) are meant for big PC.
There is(or was) an interpreted .net variant targetted at embedded stuff. But no idea how usable it is.
Well, there is a part of Java (and .NET) which is hostile to embedding systems: that's reflection.
oh and the java guys looooove that one recently ;)
The limitations on 64 bit operations(such as multipyling two 64 bit numbers to and get the high 64 bits of the result) are one of the performance issues that annoyed me most recently.
Reflection implies that the standard classes can all be accessed by names which can be computed at runtime, so it is difficult to safely "prune out" unneeded parts in a given application (unless you control all the code).
15:00
If you go the ahead of time compilation route, you need some additional annotations to tell the compiler which parts to keep even if they're apparently unused.
Mono does that when targetting iOS
since iOS doesn't allow runtime emission of code
whoa, I have a lot of comments to catch up
damn infernality
but hey, it's not often I get to correct a bunch of the smartest people I know, all at once...
so it's all good
hm? Whom did you correct?
not yet
thats the catching up.
now shush, wait your turn
@Polynomial I had a chance to reread what you wrote about CIL, and yeah, it's not as ridiculous as I thought you meant. Still wrong though.
But @ThomasPornin pretty much covered that
my point is that CIL is "compiled" directly to machine opcodes, not to C++ output.
the CIL compiler does perform many optimizations.
I believe Polynomial point was that you can construct a subset of C++ that's equally safe as C#
in fact, often the JIT output will be more efficient than compiled c++, because it is JITted to the specific machine.
you'll still have the JIT hit, of course, but after that, it's cached.
15:12
I hear that often, but at least for MS .net it's not what I see
@AviD That's the theory; also, JIT code can theoretically gather runtime statistics on usage which are beyond the grasp of static compilers; but there is a gap between theory and practice.
@CodesInChaos I have, but sure, it does depend on the user code.
In practice, what I observe is that, on pure computational cost, JIT code can be as little as 30% slower than equivalent compiled C code, but more often 2 to 3 times slower (mostly because of checks on array bounds)
@CodesInChaos ah, I must have missed that part... but it's a bit trivial to say so.
the question is what the subset consists of, and how it will be used.
Also, these JIT compilers happen to produce very fat code, so you can have nasty cache effects. E.g. a RIPEMD-160 implementation which is 50 times slower than equivalent C code, because loop unrolling was overdone a bit and, on the JIT fat code, exceeded L1 cache.
15:15
For both numerics(floating point) and integer heavy(crypto) code MS .net can't compete at all with a decent C++ compiler
@ThomasPornin the assumption is that the comparison is to compiled C code with those checks in the user code.
@CodesInChaos sure, there are cases where its not the case.
@CodesInChaos In my tests, for hashing, .NET code is similar in performance to Java code (through Oracle's VM) and though it is beaten by C code, it is still fast enough for most purposes.
@CodesInChaos now its your turn - in C# at least, using certain keywords such as unsafe and pinned you can get pretty much anywhere you want.
There is still a significant factor remaining
@RoryAlsop Submitted the draft for the QOTW for review. Not a very long one.
15:18
@CodesInChaos Significant depends on the situation. If hashing uses 3% of your CPU instead of 1%, it is still fast enough and not significant.
@CodesInChaos such as what?
On a modern PC, I get 80 MB/s hashing with SHA-256 in both Java and C#.
For example my 1 to 1 port from Curve25519 donna is signficiantly slower that equivalent c code
I need quite a lot of data to hash per second to make it worth going to C.
not run into any need for it yet, in fact I've rearely seen need for all the functionality there is.
15:20
Even for signatures: I have implemented ECDSA code which can sign 1700 times per second, but then used it in a SOAP-RPC framework with a lot of X.509 thingies around it, which limit rate to 70 signatures per second -- and that is still fast enough !
@ThomasPornin the compact framework fits very nicely on most embedded systems.
@AviD so does your face. sorry, had to do it.
@TerryChia nicely done.
C# is pretty fast, but I'd love to use it for numerics heavy code. And it's simply not good enough there
@CodesInChaos that's possible. personally I havent run benchmarks on number crunching.
15:26
MS does not use any SSE vector instructions
but many other types of apps - UI, network, data processing, even many forms of strings manipulations - it's plenty there.
possibly because the external factors are such an order of magnitude over the CPU instructions.
Most applications simply don't need the last order of magnitude of performance
@CodesInChaos really? that's interesting.
Mono has special vector float types you can use to get the performance boost of those vector instructions
@CodesInChaos I would say more, that in most applications the last order of magnitude of performance are not measurable, in comparison with the other factors.
@CodesInChaos when would those instructions be relevant (it's been a while since I've delved into that level...) ?
mainly for numbers crunching?
15:29
Physics simulations for example
But nowadays those increasingly migrate to Cuda
@TerryChia will review later this eve.
so I suppose that certain apps in NASA would be inappropriate for .NET.
then again, I'm not sure that C would be more appropriate there, either.
You can put dialects of C on the GPU
But even on the CPU, c compilers are pretty close to handcrafted assembly
@avid C is always appropriate. We don't need none of yout wizbang.
Personally I'd like to use a modern language for non performance critical code, even in numerics
But that's 20 years too early
Fortran is currently on its way out in favour of c.
So you can guess how long it'll take to get something modern.
15:34
@CodesInChaos even in performance critical code. That does not mean there are not specific scenarios where a specialized language would be more fitting.
@CodesInChaos heh.
wait, they're moving TO C??
At least the group where I'm at is migrating from fortran to c.
@CodesInChaos It is not necessarily time-based. Some people have had success doing numeric computations in Lisp, and Lisp is quite older than C, and still considerably "safer".
Lisp is special
@AviD what's surprising about that?
for the low-level numerical stuff, there are only three choices: fortran, c and c++
@Gilles you're right, I should never be surprised by this.
15:36
and raw assembly
c++ is really complicated and many of these people aren't profesional programmers
@Gilles arguably, then they shouldnt be using C either.
@CodesInChaos not when you debug on your PC and run on the real data on a mainframe of a different architecture
I don't really get why we're using c instead of C++ either
@Gilles Fortunately they do not do C++, they do C-with-classes
15:37
@AviD what should they be using?
they're building their own dynamic dispatch stuff with macros and function pointers
@CodesInChaos C++ often has a lot of unneeded overhead of complexity.
That's harder to understand than C++
@Gilles no clue, I'm not familiar with what they need.
More and more of the ones who can are using things like Python. But that's possible only when someone's already done the coding of the tight loops in C or Fortran
15:38
But I would think they should either go with a modern language, or a specialized one.
@CodesInChaos Ah, the people who do that are quite advanced. The physicists I know have trouble doing loops except by copy&paste.
C is neither.
@AviD specialized for what? Numerics? That's Fortran
@Gilles well there ya go
C compilers have pretty similar performance compared to fortran
And then there is stuff like c for cuda
15:40
@CodesInChaos they're getting there now. It's recent
Aliasing is pervasive in C and invalidates a lot of possible optimizations. Fortran compilers have an easier job when all the code is manipulating big arrays. C compilers how to worry about things like aliasing on the pointer variables
@Gilles are you talking about abominations like union?
no
for example assume your function receives two pointers
no, that would be the other way around, wouldnt it.
now the c compiler can't really assume they don't point to the same thing
@AviD No, I'm talking about things like f(void *p1, size_t n1, void *q1, size_t n2)
15:45
ah, right, I get that.
especially with arrays, where there can be partial overlaps
never really seen much Fortran, so I didnt realize that doesnt exist.
C99 introduced the restrict keyword to say “no aliasing, optimize away”
pop quiz: how many programmers know about restrict? … and understand what it can and can't do?
Fortran is very pass-by-referency, but doesn't use free pointers
so basically this leads right back eventually to the whole pointer arithmatic crap. indirectly.
15:46
You can have aliasing in Fortran, mind. But only at one level
@Gilles I dont.
But I'm guessing... not much?
Type based aliasing rules are really weird too
@AviD probably not
that is, it is a flag for the compiler, but does not actually restrict your code at all?
especially considering that one of the popular vendors (Microsoft) didn't jump on the C99 bandwagon
15:48
kiddie time for me, later brains
not that anybody did, really, but Visual Studio... Is there a version of VS that supports C99 now?
Don't think so
They added some parts that overlap with the new C++ stuff
but MS isn't fond of implementing exclusive c features
@CodesInChaos which is ok if you're programming for VS, but not if you want reasonably portable code
and if you're writing heavy numerical code, you don't want to have to rewrite your code to run it on your cluster
@Gilles I am not sure there is a real, complete C99 implementation out there at all.
C99 does not distinguish between "compiler" and "library". There are compilers which are close to C99 full support, for the parts which are in the "compiler" realm.
@ThomasPornin doesn't Comeau have a full implementation?
and I thought GCC+Glibc was compliant by now
15:53
@Gilles Comeau claims "full core language C99 support", which is a way of saying "full support except for those parts that we unilaterally decide to be the responsibility of the library developer, whoever this may be and whatever a 'library' can be"
@ThomasPornin I thought they provided a standard library for Windows
 
2 hours later…
17:53
anyone ever been to Saudi Arabia?
@LucasKauffman nope - various of the Emirates, but not Saudi
whats ur experience?
@LucasKauffman in what context? I quite like Dubai, have been there with work, and for holiday, but it is quite westernised ina lot of ways.
@RoryAlsop as in 4 to 8 weeks working
18:10
@LucasKauffman be prepared for it to be astonishingly hot (> 40 degrees C) all the time, and for the fact you should not expect to have any alcohol the whole time you are there. Also there may be various strict rules (depending on your environment) on who you can talk to (when working out there, I needed an interpreter for some interviews - not because of the language, but because I needed a female colleague to talk to the women)
Also, they are likely to take Fridays off rather than Saturdays
mmm I dont like hot weather
And their observance of Ramadan can make eating a challenge (although following the rules on eating during Ramadan can be very healthy)
@LucasKauffman all buildings and vehicles will be very air conditioned - but you will end up soaked in sweat between car and office
you could actually ask this as a very valid question on travel.stackexchange.com
question posted
19:00
It's sad there havent been any level 2 prices yet
 
1 hour later…
20:08
2
Q: Using OpenSSL in FIPS mode with .NET

CocowallaI've build OpenSSL FIPS container version 2.0.1, then built OpenSSL 1.0.1c using that container (according to the instructions in User Guide for the OpenSSL FIPS Object Module v2.0): SET FIPSDIR=C:\OpenSSL\FIPS cd C:\OpenSSL\openssl-fips-2.0.1 ms\do_fips cd C:\OpenSSL\openssl-1.0.1c ms\do_nasm...

maybe one of you Windows guys have experience with this
No idea, I only know that .net + SSL = Disaster
no safe apps in .NET?
At least not for my requirements.
Found 4 different libraries, all were very lacking.
20:27
@Gilles this doesnt work like this
very useful
openssl is disaster, dont blame .net
.net works ok, and openssl does not, but it java doesnt work well either
IMHO the stunnel is the best solution
20:46
openssl-net is extra disaster
From calling conventions, some memory corruption bugs, and their high level code is rather dubious
But in the end I'm not fond of SSL itself either
yeah for small job is sometimes enough
sometimes, but why not use native windows and storming FIPS - IMHO it has sadistic background
this question is some sort of a joke
00:00 - 21:0021:00 - 00:00

« first day (627 days earlier)      last day (4551 days later) »