Skip to content | Skip to navigation
Jan 21, 2003 17:28 # 8076
Jaz *** (9) has all the information you need...
Here is a minimalist Perl script that checks a RSA key for validity, then enciphers a simple message and deciphers it again. I post it here in case someone could be interested in the basic concept behind public key cryptography.
#!/usr/bin/perl
# Simple public-key cryptography script
# ----------------------------------------------------------------
# 2002 by Henning Koch
#
# Checks an RSA key for validity, then enciphers a simple message
# and deciphers it again.
# Public key is ($n, $b)
# Private key is ($p, $q, $a)
# Message is $x
use strict;
my ($n, $a, $b, $p, $q, $x) = (195487, 178791, 759, 839, 233, 101010);
sub square_and_multiply # computes g^l mod n
{
my ($g, $l, $n) = @_;
my($x, $y, $m) = (1, $g, $l);
while($m > 0)
{
if($m % 2 == 1)
{
$x = ($x*$y) % $n;
$m--;
}
else
{
$y = ($y*$y) % $n;
$m = $m / 2;
}
}
return $x;
}
sub is_prime
{
my ($i) = @_;
use integer;
foreach my $test (2 .. $i / 2)
{
if($i % $test == 0) { return 0 }
}
return 1;
}
my $enciphered = &square_and_multiply($x, $b, $n);
my $deciphered = &square_and_multiply($enciphered, $a, $n);
print "n = pq: " . ($n == $p * $q) . "\n";
print "ab = 1 mod eul(n): " . ( ($a*$b) % (($p - 1)*($q - 1)) == 1) . "\n";
print "p is prime: " . &is_prime($p) . "\n";
print "q is prime: " . &is_prime($q) . "\n";
print "p <> q: " . ($p != $q) . "\n";
print "Enciphered x: " . $enciphered . "\n";
print "Re-deciphered x: " . $deciphered . "\n";
'Yeah, That's what Jesus would do. Jesus would bomb Afghanistan. Yeah.' - snowlion
This post was edited by Jaz on Jan 21, 2003.
Oh my, hurry pinch me. Am I dreaming??? Am I actually seeing code that Jaz wrote??? This can't be. Its gotta be a bug in the system. Surely I am not seeing Jaz's code... This is totally amazing. Now if Jaz can release code I'm sure Microsoft will do it eventually.
Jaz what are the licensing terms to this script? Surely we can't modify it and let others use our modified code.
that's almost exactly what i thought when i saw this. but i don't think it's a good idea to get sarcastic on jaz's first steps in the world of open .. err .. published source ;>
Note that, u. o. u., s. is not a computer program and his answers might not always be appropriate.
This post is far to contraversal
Controversial is an opinion that differs from the majority. What you do is just being hollow. The fact that you spent the major part of your post declaring how hollow you are doesn't make you look less like an ass in any respect.
'Yeah, That's what Jesus would do. Jesus would bomb Afghanistan. Yeah.' - snowlion
This post is far to contraversal.
If you call senseless flames "controversial", yes.
Say, and that's something I'd really like to know, why the fsck are you always provoking people and practically begging for reds? Can't you just be nice? Is it because you have that urge to demonstrate social incompetence? What the heck do you get from pissing people off this way? If you just don't like this place anymore, you could just stay away from it and never bother with it again. There's absolutely no need to provoke people until you get kicked out.
Is this so hard to grasp?
"*sigh* Some men are really hard to manipulate!" - Orchid
This harkens back to the days when the big flame wars about open source were going on. Many of you will not remember because you weren't around NAO those days.
I've been there, and I remember. I also remember you doing things that... well, things people could understand as sabotage. Just because you didn't like NAO's closed-source character. (Whatever happened to your open-source rival site anyway?)
Thats why I get alot of red ratings. Because I have differing views than the majority of NAO readers.
Sorry to kill your soap bubble here, buddy. If you get a red from me, it's because I feel you're actively trying to offend me. Different opinions are perfectly acceptable for me. The way you declare yours is not.
As many people seem to have similar thoughts, you might want to reconsider your style. When people don't like what you write, it's not always because they can't take the genius of your oh-so controversial yet brilliant statements (altho that must be a tempting thought) - more often it's plain and simply because your inappropriate way of telling it pisses them off.
"*sigh* Some men are really hard to manipulate!" - Orchid
Jan 23, 2003 15:18 # 8153
null *** (12) has all the information you need...
Like? I'd like to hear some examples of this sabotage.
Remember your resolution to bring NAO down because it's evil closed-source?
Nothing ever happened to it. Because there was never any open source rival site made.
Well my humble self remembers a story on NAO with a screenshot (? not sure about that one), and even some half-working title page. I can't remember the name tho.
"*sigh* Some men are really hard to manipulate!" - Orchid
Actually no. Can you refresh my memory?
You see, I don't happen to carry a copy of all posts written on old NAO with me, so this may be a bit difficult right now. Maybe somebody else remembers more details.
Is this sabotage? Sabotage would be cracking into the server that NAO is running on. Expressing ideas about an open source NAO is not sabotage.
And threatening to fill the site with crap to make it useless and the such is perfectly acceptable as well.
"*sigh* Some men are really hard to manipulate!" - Orchid
This post was edited by null on Jan 23, 2003.
Judging by your last journal entry I'd say you have a serious hatred for America.
Well I don't mean to attack the American people, and have tried to make that clear. I hate the current American government and get angry when I see what bullshit they start, that's right.
It's good to know that some Americans partially agree with me. :-P
Well maybe my last example was a bit too far. I've edited my post later because I didn't quite like the way it looked, but as it seems you've been quicker with quoting me than I've been with removing said example.
Look Frank, I'm not trying to portray you as an open source terrorist who tries to kill anything remotely closed-source, or something.
But the fact remains that you piss of more people than just me and Jaz with your... let me call it "sarcasm" just once. It doesn't matter what you mean to say, the important thing is how people understand it. I can't say "shut up you fucking moron" and then just declare that this is my way to say that I disagree, and that I don't mean to offend anybody with this!
What about trying to change your posting style just a little bit?
"*sigh* Some men are really hard to manipulate!" - Orchid
This post was edited by null on Jan 23, 2003.
I'll be honest.
There's a certain clique that hangs out here which is very supportive of each other. It is very hard to actually feel welcome here. The only people who have been nice have been oxygenius, shabnam, martin, and reallycooldude. The rest either tend to ignore other peoples presence completely, or just argue incesantly. It's really not that pleasant...
I'm not being rude, so please don't attack me. It's just an observation I made. Of course, you may just ignore me completely, since most of you have anyway.
Have a nice day.
-Annida
Jan 23, 2003 22:18 # 8193
null *** (12) throws in his two cents...
It is very hard to actually feel welcome here. [...] The rest either tend to ignore other peoples presence completely, or just argue incesantly.
Well if you really feel like this I'm really sorry, because that's absolutely not the impression we want you to get.
The way your posts are rated suggest that people in fact do appreciate you (and your posts), so it can't be all bad, can it?
Well I can't of course speak for the others, but for me there are two reasons not to reply to your posts (which apply to other users as well). The first and most important reason is, I have nothing to add that I think is worth reading, or everything I would write has already been said.
The second reason is when I'm either stressed or lazy. :-P If that's the case I usually make a mental note to write something later, but everybody who knows me can tell you that my mental notes have an average TTL of 30 seconds. I don't know why this is so, I just happen to forget a lot of things when I'm feeling stressed (which is like 95% of all the time :-P ).
So again, nothing I do here is intended to make you, or anybody else, less wanted or welcome. I really can't imagine any regular user trying to scare you away. If you really feel unwelcome please let us know why, and I (and I'm sure everybody else) will think about what you write.
"*sigh* Some men are really hard to manipulate!" - Orchid
The rest either tend to ignore other peoples presence completely (...)
Don't assume you're being ignored only because the replies to your posts are few. It doesn't seem logical that someone would keep his mouth shut if they had something to say.
How many replies a topic attracts depends on the nature of that topic alone. For instance, personal "my day" stories usually don't get so many follow-ups as someone not involved in the events can't always say something about them, and not everyone reads every journal. If that story raises an interesting, difficult or opinionated issue understood by the general public, the number of replies increases.
'Yeah, That's what Jesus would do. Jesus would bomb Afghanistan. Yeah.' - snowlion
Jan 24, 2003 07:37 # 8208
sifar *** (4) throws in her two cents...
The rest either tend to ignore other peoples presence completely,
Annida, that’s not true!
Well, atleast I can talk for myself. So often, I don’t reply to people’s posts (even though I might have lots to say), simply because I can’t tell where to draw the line! <Would I be encroaching on anybody’s privacy if I asked or said this? > And quite often I’ve written and deleted posts because of this. Or I don’t say anything because whatever I can think of seems so clichéd…that it could almost amount to being insensitive if I said it. <Obviously, he/she knows this…the best a friend can do is just listen, and be there. > And this is where I most like ratings….when I just rate a post “excellent” only to tell the writer that his/her posts are being read, and liked. Almost like saying… “hey, I’m listening. I know what you mean.” Maybe I should change this.
I too am relatively new here. I joined sometime in early September, and simply loved NAO. It didn’t even feel that I needed people to welcome me, simply because it feltlike home. And I wasn’t totally wrong, I found Martin here! It always felt like I belonged here. To me, NAO was a site on which I could just speak my mind….as the thoughts came, no strings attached.
<On a side-note> (I’ve not commented on this before, and I don’t think I ever will again.)
Somehow, I’m missing the old feel here these days. I’ve been noticing that there are topics on which I’ve things to say, but I remain quiet…only ‘cause I don’t feel like! I guess I’m not comfortable with people attacking each other (sometimes even with no meaningful thoughts to be conveyed). I don’t like people getting personal. I don’t like the fuss about ratings. Are we so immature and insensitive that we can’t handle them?
Sigh. Just my two cents.
Give me a fistful of sky and an ounce of ether... and take eternity in return.
Jan 26, 2003 19:11 # 8290
Orchid *** (7) throws in her two cents...
It is very hard to actually feel welcome here. The only people who have been nice have been oxygenius, shabnam, martin, and reallycooldude. The rest either tend to ignore other peoples presence completely, or just argue incesantly. Of course, you may just ignore me completely, since most of you have anyway.
I can't believe you're thinking this way!
First, every new user who is posting some interesting post or sends out a happy hello, "I am" with some personal information usually gets a warm welcome by at least three our four long term users.
Second, your posts must have all been often read because you get a lot of very good ratings, even better then some of the "old" users.
Third thing: You tell, the only people having been nice to you are those you mentioned. What do you want to say with his? That the ones who didn't reply to you or something like that are not nice? I can't agree on that. Maybe they just had nothing to add or, as it concerns me, don't have a lot of time to spend on NAO and therefore only talk to people they have to say something. E.g. me is usually just talking shortly. In the last time I also wanted to talk to oxygenius or MrCrash when they were online and had not enough time to do and logged out. They didn't page me either but I don't think now that's because of me.
On the other hand: You also have the opportunity to page other people and, this way, get to know them.
I think it's a little unfair to say we're not nice because we didn't make the first step towards you. It always needs two. NAO is having many new users per day and Jaz is lucky about everyone, I can really say, because we had discussions like this before. Only time reveals if a new user stays at this place.
Some of our users may be a little more introverted and don't want to make the first step towards the other but we also have many others: null and andromacha e.g. often page other users no matter if they know them or not.
So, please, just don't judge other users before you don't get to know them.
"Sie wollen nichts anderes. Sie wollen kämpfen! Sie sind Soldaten! Fucking Wahnsinnige!" - Noel G.
You have taken my posting, and why I posted it out of context. I was not attacking people for not being nice to me, per se. I was talking that there *is* a clique on this site which backs each other up no matter what, case in hand.
If you can't see this by your own statement, I can't really blame you. You admitted that because of limited time tend to read posts from people you know. Where does that leave the rest of the new people? I am not complaining about ratings, I'm just trying to be reasonable, and as unbiased as I can be.
-Annida
Jan 26, 2003 23:35 # 8306
null *** (12) throws in his two cents...
Annida -
I'm not trying to reply to your post as a whole, please don't understand this post that way.
All I wanted to add is that I can assure you, there were times when people of that 'Inner Circle' were wrong ant not backed by the others.
And (sorry if I'm repeating myself) the last thing anybody wants is the the newbies feel unwelcome and, dare I say, 'non-elite'.
"*sigh* Some men are really hard to manipulate!" - Orchid
Wanna bet that 1st rating is red.
Just FYI, the first rating was not red. When I first read your post I found it funny. But, after reading your edited remarks, I do feel that I was wrong, and this was not a healthy sarcasm. It seems that you did want some reds. Too bad, I can't change my vote now.
Love is blind, but marriage is a real eye opener.
Jan 23, 2003 08:51 # 8138
null *** (12) has a suggestion...
Maybe people would be a bit more open to your
things that are far out of [our] realm of thought
if you chose a different, less offending way to spread them.
When it so much seems like all you want is piss me off, why should I even bother to try and find a deeper meaning in your posts and reply to it?
If all you want is spread chaos and offend people to start a controversy, so be it. But I'm not sure if NAO is the right place to do it - I for one like it better when people exchange their opinions in a nice, less Rambo-like way.
"*sigh* Some men are really hard to manipulate!" - Orchid
This post was edited by null on Jan 23, 2003.
What I sense in the NAO readership is this trait that you feel threatened and abused when people post things that are far out of your realm of thought.
Your posts don't have any substance to be egible for being outside or inside any realm of thought. Nobody would get annoyed like this at controversial opinions but you don't have any. All you write about is how great it is to upset other people.
'Yeah, That's what Jesus would do. Jesus would bomb Afghanistan. Yeah.' - snowlion
Far from the maddening crowds, a place to kick back and lead an intelligent discussion in peace. We respectfully ask the braindeads to stay outside
Calm down, boys, ALL of you, I think we all understood the message meanwhile!
After decades of construction my website is finally up an running: www.kkds.de
In case someone is interested about what I wrote in the first place, it occured to me that if you're checking for prime numbers in the naive (= brute force) way, you only have to test from 2 to the square root of the respective number.
Perl has no "round" function, and I can't try out the sprintf hack here, but it might look like this:
sub is_prime
{
my ($i) = @_;
foreach my $test (2 .. sprintf("%i", sqrt($i)))
{
if($i % $test == 0) { return 0 }
}
return 1;
}
'Yeah, That's what Jesus would do. Jesus would bomb Afghanistan. Yeah.' - snowlion
This post was edited by Jaz on Jan 23, 2003.