d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Make Me A Better Programmer - From Step 1
Prev1212223242556Next
Add Reply New Topic New Poll
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
May 21 2013 03:37pm
Quote (irimi @ May 21 2013 04:26pm)
again, it's something you should take with a grain of salt because this kind of material makes it easy to point at a bunch of things and say "look, i learned these things!"

whereas in more high-level classes (like... high school geometry) it's hard to exactly pinpoint the things you learned (or at least, say that they're useful), but the actual *learning* you do in those classes is far more important.

and yes, i'm actually making the case that your high school geometry class taught you more than this systems class possibly could


LOL I know what you mean. I kinda jumped the gun there. I think as far as actual intellectual development, my math and logic courses have done way more than most of the CS classes I have taken up to now.

I became a slightly different person after I finished Calc 1 and 2.

This post was edited by Eep on May 21 2013 03:37pm
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Jun 18 2013 01:22pm
start my first senior level course today. Should be interesting! Syllabus: (Class is Systems Administration and Computer Security)

week chapter topic
1 1; 3 Intro to Security; Mathematics
2 4, 5 Symmetric Key Methods, DES, AES
3 6, 7 Block Cipher Modes; RSA and ElGamal Methods
4 16 Elliptic Curve Methods
EXAM 1
5 8, 9 Message Integrity; Hashes; Signatures
6 10 Key Distribution; Security in Application;
7 10, 11 SSL: Security in Transport Layer; Digital Cash
8 – Security in Network Layer & IPSec

This post was edited by Eep on Jun 18 2013 01:22pm
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Jun 27 2013 03:01pm
lot of shit going on in AES, heh. Finishing up symmetric key methods today.

Wondering how difficult it is to hard code some of this stuff. I wouldn't mind testing some of it out.
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Jun 30 2013 08:12pm
last class we covered El Gamal methods, Asymmetric key methods, and RSA. We barely touched on elliptic curve methods but man that shit is funky.

read this today as well - http://www.cs.umsl.edu/~schulte/cs4780/Documents/AKS-primality.pdf

algorithm seems like it would take quite a few parts to construct

This post was edited by Eep on Jun 30 2013 08:24pm
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Jul 16 2013 11:15pm
Code
#include <iostream>
#include "safer.h"
#include <string>
#include "boxes.h"
#include <stdlib.h>

using namespace std;


int main(int argc, char * argv[]) {

   string hex_key = argv[1];
   string message, temp;
   byte priv_key[8], y[8], block[8];
   byte stage_keys[2*r+1][8];

   if (hex_key.length() != 16 ) {
       cout << "Invalid key size: Use a 64-bit hex-character key." << endl;
       return(1);
   }

   /* let's convert that damn hex to unsigned chars.... */

   for (int i = 0; i < hex_key.length() / 2; i++) {
       temp = hex_key.substr(2*i, 2);
       priv_key[i] = (byte)strtoul(temp.c_str(), NULL, 16);
   }

   /* a function to generate our stage keys! */

   key_generate(r, priv_key, stage_keys);

   cout << "Please enter the message to encrypt:" << endl;
   cin >> message;

   /* This loop extracts 8 byte blocks and runs them through the stages... */

   for (int i = 0; i < message.length() / 8; i++) {
       temp = message.substr(8*i, 8);
       for (int j = 0; j < temp.length(); j++) {
           block[j] = (byte)temp.at(j);
       }
       safer_stage(block, stage_keys, y);
   }

   /* ...if we have any bytes left, we create one more block with padded 0's */

if (message.length() % 8 != 0) {
       int mod = message.length() % 8;

       message.erase(0, message.length() / 8 * 8);
       temp = message.substr(0, mod);
       for (int i = 0; i < temp.length(); i++) {
           block[i] = (byte)temp.at(i);
       }
       for (int j = mod; j < 8; j++) {
           block[j] = 0;
       }
       safer_stage(block, stage_keys, y);
   }

   return(0);
}


this is the main portion of my safer sk-64 implementation

found a neat way to do a left end-around 3 bit rotate online which helped:

Code
byte rotate(byte element) {
   return ((element<<3)|(element>>5)) & 255;
}


This post was edited by Eep on Jul 16 2013 11:16pm
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Jul 25 2013 10:26pm
that ended up getting changed a little bit to clean it up but anyways, the class is almost over.

I was surprised to find that in a class of like 60% grad students, so many of them had problems with this project. I had to stay one night to help several people (including one guy who tried to force an object oriented implementation of the project).

Things are winding down though. Finishing the class talking about security in various layers of the internet - network, transport, application. Some interesting stuff.

I guess what I can take away from this class is the fact that security is a pretty big issue, at least some forms of real world "hacking" were explained (man in the middle attacks, replay attacks, brute forcing and strength of algorithms etc) and the overall implementations of security vary greatly (like comparing an application like SSH to the SSL library for example).

I went in not really interested in the subject material but was pleasantly surprised by how much of it I enjoyed.

Final coming up in 2 weeks.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jul 25 2013 10:31pm
all i know about security is summed up with little bobby tables
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Jul 25 2013 10:53pm
Quote (carteblanche @ Jul 25 2013 11:31pm)
all i know about security is summed up with little bobby tables


cool field for people who have an obsession with discrete math
Member
Posts: 11,637
Joined: Feb 2 2004
Gold: 434.84
Jul 26 2013 07:42am
Quote (Eep @ Jul 25 2013 11:26pm)
that ended up getting changed a little bit to clean it up but anyways, the class is almost over.

I was surprised to find that in a class of like 60% grad students, so many of them had problems with this project. I had to stay one night to help several people (including one guy who tried to force an object oriented implementation of the project).

Things are winding down though. Finishing the class talking about security in various layers of the internet - network, transport, application. Some interesting stuff.

I guess what I can take away from this class is the fact that security is a pretty big issue, at least some forms of real world "hacking" were explained (man in the middle attacks, replay attacks, brute forcing and strength of algorithms etc) and the overall implementations of security vary greatly (like comparing an application like SSH to the SSL library for example).

I went in not really interested in the subject material but was pleasantly surprised by how much of it I enjoyed.

Final coming up in 2 weeks.


Grad students in CS tend to also be very shitty programmers but good computer scientists. Generally you go on to grad school if the theory of computation is your thing rather than programming.
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Jul 26 2013 01:55pm
Quote (rockonkenshin @ Jul 26 2013 08:42am)
Grad students in CS tend to also be very shitty programmers but good computer scientists. Generally you go on to grad school if the theory of computation is your thing rather than programming.



I personally love the 'study' of Computer Science a lot, which is why I have stuck with it for so long. Every time I learn something NEW about software/hardware etc that I didn't know before and get my mind blown, its like a drug fix lol.

I am probably not the best programmer either, I still have some bad practices and I don't do enough stuff in my free time, but when I do projects for classes I always try to apply new techniques I have learned which help reduce errors.

I know I have gained a lot of respect for the people in the field, either in practice or study. I hope I can be as useful as them someday!
Go Back To Programming & Development Topic List
Prev1212223242556Next
Add Reply New Topic New Poll