XOR basically returns 0 if the two bits it is comparing are the same, and a 1 if they are different. It's quite useful in encryption because if you XOR two bits and get a result, you can XOR one of the original bits with a bit of the result to get the other original bit. So, if you XOR some data with a key to get some XOR encrypted data, you can send the encrypted data and as long as the person has the key you XOR'ed it with, they can XOR those two together to get the unencrypted data...

-----------------------------------


Back to the code...I don't know DES, but I think the goto statements can be replaced with some while looping code that ends appropriately. I can't really follow how the tables are split and reorganized and then left to take up space unused, but one thing that can be done to help keep down on the code is to define & initilize the array at the same time, or really close to each other.


You might be able to do something like this (I don't feel like breaking out a c-compiler to check the code):
Code:
int s1[3][15] =
{
  {14, 4, 13, 1, 2, ...etc}, {0, 15, 7, 4, ...etc}, {4, 1, 14, ...etc}, {15, 12, 8, ...etc}
};

Good luck. The book seems...dated...