« first day (558 days earlier)      last day (4392 days later) » 

9:00 AM
struct crypt : std::binary_function<int, int, int> {
int operator()(int input, int key) const {
int result = 1;
for (int i=0; i<key; i++) {
result *= input;
result %= n;
}
return result;
}
};
 
That's all RSA is?
 
Though restricted to toy-sized arguments, that's a complete implementation of RSA.
 
See, that's what I don't understand
what do you mean by that?
 
On the other hand, change the ints to ZZ (for one example) and include an extra header (zz.h) and it'll work with large enough arguments for real use.
 
@JerryCoffin hmmm. 2012 - 27 + 10 = 1995. Are you talking about google?
 
9:02 AM
@JerryCoffin, Really, that's all I would have to do?
 
@sehe I'm not the one who said he was 27. I'm a little older than that.
 
change the argument types from long to zz?
 
@Walkerneo In this code, yes. In the other code you were dealing with, no.
 
What did you mean though, about complete implementation of RSA?
 
@JerryCoffin ah, so you are talking about Sinclair/Atari (hope you don't mean Microsoft :))
 
9:04 AM
@Walkerneo I mean that implements RSA, just for small key sizes.
 
uploading image twitter. on status bar... uploading(7%)... uploading(86%) ... uploading(3%) ? WTF?
 
Is an RSA algorithm hard to write?
 
@sehe Lord no. I'm talking about things like Altair and KIM-1.
 
and then... 'the connection to twitter.com was interrupted'
 
@IntermediateHacker It's uploading different things in sequence, restarting, or experience heavy back winds
 
9:05 AM
RSA is an algorithm for public-key cryptography that is based on the presumed difficulty of factoring large integers, the factoring problem. RSA stands for Ron Rivest, Adi Shamir and Leonard Adleman, who first publicly described it in 1978. A user of RSA creates and then publishes the product of two large prime numbers, along with an auxiliary value, as their public key. The prime factors must be kept secret. Anyone can use the public key to encrypt a message, but with currently published methods, if the public key is large enough, only someone with knowledge of the prime factors can feas...
 
I read the wiki, or at least what bits I could understand of it
 
doesn't look too hard, but I wouldn't rely on my own implementation :P
 
@JerryCoffin Phew. That is a relief. Sadly, those were before my time. And also beyond my mom's wallet.
 
On the wiki, it seemed REALLY simple until they said: "He first turns M into an integer m, such that by using an agreed-upon reversible protocol known as a padding scheme"
 
The MITS Altair 8800 was a microcomputer design from 1975 based on the Intel 8080 CPU and sold by mail order through advertisements in Popular Electronics, Radio-Electronics and other hobbyist magazines. The designers hoped to sell a few hundred build-it-yourself kits to hobbyists, and were surprised when they sold thousands in the first month. The Altair also appealed to individuals and businesses who just wanted a computer and purchased the assembled version. Today the Altair is widely recognized as the spark that led to the microcomputer revolution of the next few years: The computer...
 
9:07 AM
@Walkerneo what's confusing about that?
 
Is the padding scheme a constant thing used in RSA, or does it mean something specific to every usage of RSA?
 
It wasn't on the market yet when I was 10, but if I'm not mistaken, some rumors were starting to float around that somebody might be building something sometime soon...
 
@RMartinhoFernandes gcc version 4.7.0 20111010 (experimental) [trunk revision 179769] fails after 7 minutes with largely the same memory curve as 4.6.1 on my 64 bit machine (128 stars, N=10000)
 
say I want to send you and instance of struct {char a,b,c} and for what ever reason it needs to be say four bytes, we agree that I will actual send you struct{char a,b,c; char IGNORETHISPADDING}
 
@Walkerneo Most block encryption uses some sort of padding. It basically just means taking whatever odd length your data might be, and adding enough to the end to make it a multiple of the block size. Reversible just means doing it in a way that the guy on the other end can undo determinstically.
 
9:10 AM
@Walkerneo I imagine padding is not done by the RSA. The send/receive pair need to know what data they are expecting, so it would be them who have to pad
 
Alright, so that won't be a problem
 
no, it's either going to be handled via your RSA lib, or you do it your self as a relatively trivial task
 
About turning the message into an integer though
He first turns M into an integer m
 
The usual padding scheme is to add zero bytes (always some minimum number) and at the end, a byte (or a few bytes) giving the length of the padding, or perhaps the length of the data.
 
Imagine I want to send you "TURKEY TROTS TO WATER GG FROM CINCPAC ACTION COM THIRD FLEET INFO COMINCH CTF SEVENTY-SEVEN X WHERE IS RPT WHERE IS TASK FORCE THIRTY FOUR RR", but I don't want the Japs to decrypt that easily. So I pad that with "THE WORLD WONDERS" at the end, and hilarity ensues.
 
9:13 AM
The message, I should mention, is a sha1 hash
 
@Walkerneo Take N bits of the message at a time, and treat them as an integer. Just for example, if you're using a 1024-bit RSA key, then you work in 1024-bit blocks, so you take 1024/8 = 128 bytes of the message, and treat them as a 1024 bit number.
 
wait... you taking some data, hashing it, such that you now have a random(ish) value that means noting much at all, and then encrypting it for transfer...
 
It's the structure of stfs for the xbox 360
@JerryCoffin I've read that a few times now and I'm still not sure what that means
 
Are you sure your trying to solve your problem and not your solution?
 
@thecoshman Not sure what you mean by that either
 
9:17 AM
@Walkerneo you know what the difference is between an integer and a float? At the bit level, nothing, they are just two ways of interpreting bits
 
 
right, I'm not following though
 
That is hilarious
 
@Walkerneo Assume for the moment that the message was my previous message. Take the first 128 bytes ("Take N bits..."). I can take two of those and treat them as a 16-bit number. If I grab 4, they make a 32-bit number, and so on. In this case, we're taking 128 of them, and treating it as a 1024-bit number.
 
@Walkerneo It is a common situation people get them selves into, they start of trying to solve there problem and get carried away with the initial idea. for example, I want get some food to eat, I get food from shops, so I need to set up a shop for my self. Wrong solution, you just needed to go to the shops
 
9:20 AM
@JerryCoffin How would I work with a 1024 bit number in Python though? Also, I don't really understand how the RSA works, and definitely not how I could divide it into parts
 
FTR, VC11 seems to have passed the initial version of the torture test in a little over an hour.
 
@Walkerneo do you need to know how RSA works? You just want to make use of the library, some one has already solved the hard maths for you
 
@RMartinhoFernandes @stdOrgnlDave gcc version 4.7.0 20111010 succeeded to compile with 9 stars and N=100 in 8m54s (ugh). Note how the memory curve seems to indicate more frequent (partial) reclaims (especially the significant dent at the ~57 seconds mark):
 
@Walkerneo Offhand, I'm not sure (I don't use Python much). I'm sure somebody's written a bignum library for Python, but I can't really give any advice about how to use it. Then again, for all I really know, it might have native support for bignums. I just don't know for sure.
 
But the librayr only takes long arguments, when the parameters are 64 or 128 bytes long
 
9:22 AM
perhaps your RSA library takes an array of long, expecting maybe 1024/bits per long
 
Woah, contrast with 8m54s ^
I thought _that_ was pathetic on it's own :)
 
@sehe what you testing?
 
Python long is a bignum.
 
Good lord, is Java tedious for its intended purpose of network programming!
 
9:25 AM
@Potatoswatter that's it's intended purpose?
 
Java is tedious for everything
even for XML parsing, which is really ironic, given that it tries to cart off as much as possible to XML configuration files
 
@thecoshman Well, it was invented by Sun, and networking and networked apps were pretty much their sole business.
 
but yeah, networking in Java is not that fun. Especially as more or less everything in the networking library seems to be blocking, soy you either have to constantly wait for data, or make use of epic number of threads
 
@thecoshman nio has been around for a long time now.
 
I don't care about performance, I just want to be able to construct a URL and load the data from the resulting query in less than 50 lines.
 
9:27 AM
@thecoshman I'm all for Java bashing, but complaining about problems that don't exist in a long time is not fair.
 
@thecoshman Sun made their money on hardware, and by some strange coincidence, sold CPUs that supported more threads than anything else on the market. I wonder how that happened.
 
@Potatoswatter Good luck. U mad bro?
 
loading data from a URL shouldn't take that much work
 
@KonradRudolph I guess you could say that.
 
@RMartinhoFernandes huh? what do you mean?
 
9:28 AM
@thecoshman Not everything is blocking.
 
@RMartinhoFernandes "more or less"
 
@Potatoswatter (Context: this is one of the only things that I ever used Java for … horrible expericence …)
 
@Potatoswatter So why are you using Java? Why not C++ with cURL?
 
@KonradRudolph use Java... horrible experience
 
Thanks for the help guys
 
9:29 AM
@thecoshman You mean half of it?
 
@JerryCoffin probably the usual 'cross platform' crap
 
just going to do it in PHP, because that seems to be what I was looking for
Good night all!
 
@Walkerneo G'night.
 
@thecoshman OK, more like 20 lines really. But it should be a one-liner. All this encoding-object bullshit and explicit construction of temporaries!
 
lol, the perfect solution to any problem, throw more languages at them :P
@RMartinhoFernandes are you asking what I mean by my use of 'more or less' or stating firmly that only half of the Java socket library is blocking?
 
9:31 AM
@JerryCoffin I'm not in charge here ;v)
 
@Potatoswatter You have my condolences (and no, I'm not being sarcastic, I'm quite serious).
 
Well, Java was a pleasure for the numerical side, actually. It's just that network programming involves more datatypes and formats, and Java's type system is very weak.
 
@thecoshman There are two I/O APIs in Java: a blocking one, and a non-blocking one. I'm assuming each of those counts as half.
 
Of course, it's strongly typed, but I mean weak expressiveness.
 
@RMartinhoFernandes aren't there also at least two "new" ones, deprecating older ones?
 
9:34 AM
@sbi Are you seriously arguing from a corporation standpoint?! There are companies still using DOS and VB6 …!
 
If you decide to exclusively use the blocking API, of course everything is blocking.
 
@RMartinhoFernandes there's a decent networking library for Java!
 
@jalf There's a third one in Java 7, yeah. I'm not certain about what it deprecates, though.
@thecoshman Since 1.4 (2002).
 
sbi
Good morning everybody. I just got divorced. Again.
If I could, I'd buy you guys a round now, and get drunk with you, instead of working.
 
@sbi congrats... I think :S
 
9:36 AM
@sbi yikes. You ok?
 
@sbi Seriously? You just built a damn house!
 
sbi
@jalf Yeah. Not my first time.
 
#include<me>
 
@RMartinhoFernandes I only found one that would hang when you try to read from the socket, so I had to wrap it with threads so I could leave listener objects to just pull in all the data they can... oh well
 
Well, it's ok if you don't get accustomed to this…
 
9:37 AM
lol
 
sbi
@Potatoswatter No, I didn't. I only have a very small garden (280m²) with a very small (24m²) garden house on it. And I "only" replaced the broken water pipes on it. Otherwise, I rent an apartment.
 
@sbi is this just the formal side of it though? You've been 'single' for a while now havn't you?
 
@sbi Didn't you share some pictures of your family at a construction site?
 
sbi
@thecoshman More than two years, yes.
 
oh
 
9:39 AM
Oops, that was Jerry Coffin. Never mind.
>.<
 
sbi
@Potatoswatter Me sharing pictures of my family here? Haha. I hear everybody laughing. Me, who won't even publicly say how many kids I have.
@Potatoswatter :)
 
@sbi But everyone knows already. It's "a lot".
2
 
@sbi I am fairly sure I can count <CENSORED>
 
sbi
@Potatoswatter In fact, my lawyer told me afterwards that he'd be glad to see me when he celebrates the opening of his new office, but he certainly hopes he won't see me again as a client. For my sake, he added.
 
@sbi you know it's bad when you get offered a free one
 
9:41 AM
@sbi Oh, you knew he'd miss you!
 
sbi
@KonradRudolph The question is how many of those are out there. I am pretty sure that there is a considerable amount of developers working with SVN, even CVS. There's not such an amount working in DOS.
 
@RMartinhoFernandes I didn't think he had that many sprogs, but maybe one is a lot for you
 
sbi
@Potatoswatter I doubt it. There's not much to earn from me.
 
@sbi Of course. Like I said, it’s worth knowing how to use it. But the question essentially was “we have a project, we need to collaborate, what should we use?”
 
Is a sprog a typo, or really a word? googles
 
sbi
9:43 AM
@RMartinhoFernandes I had to look it up, too, and leo said it means "child".
 
You never know, coming from you know whom.
 
yeah, sprog => child
who's Leo?
 
Some dude that knows languages.
 
My main problem with svn is that it doesn't let me version control my work! I have to commit it to a central repository, which, almost by definition, I can only do when I'm done with a task (or I'll break the build for everyone else). So while I'm working, I effectively can't use SVN. A version control system that doesn't let me version control my work seems like a pretty good definition of "broken" to me
 
@RMartinhoFernandes Valdermorte is in here!?
 
sbi
9:45 AM
@KonradRudolph And, as I said, there are good reasons to consider non-distributed VCS tools. Maybe not good for you, maybe not good for me, but for a considerable amount of employees it's good enough for their company.
 
@thecoshman Really, even I know how to spell that correctly.
 
@sbi no, there are good reason to consider not using the distributed aspect of a DVCS freely. There are no good reasons to use a centralized VCS
 
@jalf well, they idea is that you branch for when you want to do work, commit all the steps you make, then merge when you are done with your little bit of work
@RMartinhoFernandes well, it got the point across :P
 
@thecoshman Except that SVN sucks at branches, and isn't designed for small fine-grained feature branches
 
9:46 AM
lol, branches in SVN.
Merges in SVN are so painful I can't even begin to describe it.
 
sbi
Of course, there are disadvantages to having to commit to a centralized repository. (Although I regularly commit to my feature branches, and I rarely ever have any trouble merging branches in SVN.) But from certain POV's there are also advantages.
 
only got experience with SVN with about 5 people at a time, never had a problem branching and merging. Though you do need to set up your branch first
 
@sbi That’s a misunderstanding then. git/hg are not only distributed VCS. For all intents and purposes, they are VCS 2.0 where SVN is 1.5
On the contrary, they work better than SVN for non-distributed, local projects
SVN always requires a server
 
@sbi You can have a centralized repository with a DVCS as well. You're just removing a limitation from the tool, it doesn't force you to change your workflow
 
… and don’t get me started on branches
 
sbi
9:47 AM
@RMartinhoFernandes That, too, is bullshit and hyperbole. Everybody here creates feature branches. I sometimes juggle several at once. Merging is not painful.
 
@KonradRudolph Nope, SVN works fine purely on the filesystem.
 
@sbi Depends on what you compare it to
 
@KonradRudolph all source control does. Nothing stops you from running the SVN server on your local machine
 
@RMartinhoFernandes But then you have a local server
 
9:48 AM
@RMartinhoFernandes yes...
 
@thecoshman Yes but you still need to run a server which is an unnecessary (albeit rather small) hassle to set up
 
SVN supports file:// URLs.
 
@thecoshman No. Neither git nor hg need a server
Local repositories are self-contained
 
@KonradRudolph SVN doesn't either! You can have a central SVN repo running purely on network shares.
 
@RMartinhoFernandes yes, but it still separates the server (with all your history) from your checkout. You have a server/client setup whether you want it or not
 
9:50 AM
@jalf Oh, sure, but there's no "hassle" in setting up a server unless you want it.
 
@KonradRudolph oh I see what you mean. I'm thinking in the way you would have a sort of 'master' git/hg machine that can be used as a public interface (bitbucket.org for example)
 
@RMartinhoFernandes Yes, I get it. But you still need a central repo.
 
sbi
@jalf I know I can, and I consider this an advantage. But for a company, it can be a disadvantage to know that some half-baked feature might only be committed locally on that laptop of the developer who just got hit by a bus.
Please don't get me wrong: I am not saying SVN is better than DVCS. All I am saying is that there are reasons for companies to stick to non-distributed ones. Whether I agree with those reasons doesn't matter. I also do not like a lot of all the other decisions that are sometimes forced on me against my counsel. Yet, I often can see that they make sense from an economic POV.
 
@sbi knowing that it is committed locally on his laptop is still better than the SVN scenario: that the half-implemented feature only existed in his checkout, but wasn't even committed locally
 
also, if a repo has huge amounts of history, with git/hg you have to copy that all to your machine to get set up. With SVN you get the version you want to work with
 
sbi
9:52 AM
@jalf I have played with hg and git.
 
and again, that's a question of policy. Nothing is stopping developers from pushing their half-implemented features to remote repos or branches
 
sbi
@jalf Shrug. I am not going to answer to that again. I have already done so, and all you guys do is reply in those FUD bubbles of the DVCS crowd. I won't waste my breath on this.
 
@thecoshman And how often do you need that? That's not the part you really, really need fast.
 
Then you get the more robust branch/merge handling and better performance
@sbi It is not FUD to say that a more flexible tool can do everything that a crippled and limited one can do
A DVCS is better at a SVN workflow than SVN is
 
sbi
@thecoshman From what I heard often a git repo with all history is smaller than an SVN checkout.
 
9:53 AM
yeah, I see no difference between with SVN having it done but not checked in and git/hg done, committed, but not pushed. Either way, if it is gone it's gone. With both, you just have to hope that some of the work was pushed to others
 
sbi
2 mins ago, by sbi
Please don't get me wrong: I am not saying SVN is better than DVCS. All I am saying is that there are reasons for companies to stick to non-distributed ones. Whether I agree with those reasons doesn't matter. I also do not like a lot of all the other decisions that are sometimes forced on me against my counsel. Yet, I often can see that they make sense from an economic POV.
 
@thecoshman Except that if it was on git/hg, the developer had a very easy way to push it to other remote repos, so it's less likely to be gone
 
@sbi well I'll be dammed! that makes no sense how that can be
 
@sbi You are saying that there are reasons to use SVN, but you haven't mentioned what any of those reasons are
And then you're accusing us of FUD
 
@thecoshman It's because SVN WCs suck. That one was easy.
 
9:55 AM
@jalf not really, it's just as easy to svn commit as it is to git/hg commit+push
 
sbi
@jalf It's FUD to keep saying that, when you use SVN, nothing will be checked in when I have already said that here, we use feature branches (despite the FUD which says that those are also impossible) and check in daily.
 
FUD needs to be added the acronym list
 
@thecoshman No. With git/hg, it's (1) faster, and (2) gives you the option of pushing to any repo you like, not just the remote one. So you can easily back up to another machine, if you don't have access to the central repo, for example
 
sbi
@jalf I thought this would be obvious: A centralized repro is much easier to assure backups from for big companies. That's certainly one reason I heard cited more than once from companies who have considered DVCS, but then abandoned the ide.
 
@sbi but how is a centralized SVN repo easier to back up than a centralized Git repo?
 
9:56 AM
@jalf touché
 
heck, with the git repo, I can just do git clone, and I have a full backup
 
I think most DVCS users use a centralised repo anyway.
 
with SVN, I .... can't
 
well, with a dedicated central server, you know that everything worth saving is in one place. with DVCS, it can by it's very nature be any where!
 
@thecoshman Not with proper policy.
 
9:57 AM
@thecoshman No. With a centralized server, you know that everything people bothered to commit to it are on it. Exactly like with a DVCS
in both cases it comes down to trusting that your develoeprs pushed their changes to the central repo
 
If you feel like you need to enforce that policy through the tools, you probably need better hires.
 
neither SVN or Git forces them to do so
 
sbi
@jalf If it's checked into some branch in SVN, it's in one repo. If it is checked in into some cloned repo in git, it might be anywhere. Some companies do not like the idea of code changes being spread out across an arbitrary number of repos all developer machines.
 
@sbi Then they just tell their developers not to spread it out across an arbitrary number of repos
 
@jalf can (I think)
 
9:59 AM
I still don't see how that is any different
Again, it comes down to trusting that if you tell your developers "push your damn work to the central repo", then they will push their damn work to the central repo
 
sbi
@RMartinhoFernandes See, now you cite "policy" rather than tools enforcing it, but when it comes to using feature branches, the DVCS crowd always claims "nobody does it". (Which is, of course, bullshitt.)
 
SVN doesn't magically make that happen. It requires developers to commit
 
@thecoshman That's an administration tool. @jalf's point was that git's client that muggles use does the backups.
 
@jalf just like you can tell them to use certain coding standards, or write proper test code etc.
 
sbi
@jalf Yeah. Or tell your developers to check into feature branches. We're down to policies now.
 

« first day (558 days earlier)      last day (4392 days later) »