These are chat archives for gwydirsam/DickGrayson

20th
Apr 2015
Sam Gwydir
@gwydirsam
Apr 20 2015 13:05
@/all hey if you can, read the memo ritchey emailed us before we meet.
Rafael Moreno
@ralphie9224
Apr 20 2015 14:16
will do
Sam Gwydir
@gwydirsam
Apr 20 2015 14:16
it's in share/project-spec/spec-update-memo.pdf
Rafael Moreno
@ralphie9224
Apr 20 2015 14:48
make test-all give me errors now sam
Sam Gwydir
@gwydirsam
Apr 20 2015 14:49
is it those exceptions?
Rafael Moreno
@ralphie9224
Apr 20 2015 14:49
======================================
Starting Release Build
======================================
-- GMP libs: /home/ugrads/r/ralphie9/local/Linux/lib/libgmp.so /home/ugrads/r/ralphie9/local/Linux/lib/libgmpxx.so
CMake Error at /home/ugrads/r/ralphie9/local/Linux/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES
  OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
  /home/ugrads/r/ralphie9/local/Linux/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
  /home/ugrads/r/ralphie9/local/Linux/share/cmake-3.2/Modules/FindOpenSSL.cmake:334 (find_package_handle_standard_args)
  CMakeLists.txt:79 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/ugrads/r/ralphie9/315/DickGrayson/build/CMakeFiles/CMakeOutput.log".
See also "/home/ugrads/r/ralphie9/315/DickGrayson/build/CMakeFiles/CMakeError.log".
make: *** [all] Error 1
Sam Gwydir
@gwydirsam
Apr 20 2015 14:49
Ah
switch to develop
Rafael Moreno
@ralphie9224
Apr 20 2015 14:49
these?
Sam Gwydir
@gwydirsam
Apr 20 2015 14:49
and pull
then make install-deps
yeah it's looking for openssl, which we now depend on
actually it's in your branch too
just pull
Rafael Moreno
@ralphie9224
Apr 20 2015 14:50
I did pull. so now I just run the make command?
Sam Gwydir
@gwydirsam
Apr 20 2015 14:50
yeah
though I /just/ pushed to your branch
so maybe you don't have that yet
Rafael Moreno
@ralphie9224
Apr 20 2015 14:51
ok. i'll pull to make sure
also,
saw your comment on the RsaCrypt class
I changed it to PublicKey for now, but I was planning on having the public and private be in that class
good idea?
bad idea?
and just have it be keys in general
Sam Gwydir
@gwydirsam
Apr 20 2015 14:51
not really sure
public and private keys are exactly the same thing though
just one your decide to keep private, the other public
Rafael Moreno
@ralphie9224
Apr 20 2015 14:52
really? in the scope of our project they seem different based on the requirements. I'll take a look at it again, but ok. I'll keep it how it is in that case
Sam Gwydir
@gwydirsam
Apr 20 2015 14:53
Let me know if you find something, generally you just use them for different things, but their makeup is exactly the same
@ralphie9224 also rsa-crypt-lib should only use dgrandomprimes, or one of those dg types, not mpz_class directly
Rafael Moreno
@ralphie9224
Apr 20 2015 14:55
ok yea. clearly idk anything about this ,buuuuut in the documents n and e as the public key and pqd as the private. I haven't actually done the math to see if they would be the same for our case, i just assumed they'd be different.
ok i'll scope it out
Sam Gwydir
@gwydirsam
Apr 20 2015 14:57
ah I think you're right
Rafael Moreno
@ralphie9224
Apr 20 2015 14:58
I'm going to walk around this world telling people public and private keys are different because of this stupid assignment
Sam Gwydir
@gwydirsam
Apr 20 2015 14:59
haha I think they are different though
because the private key has p and q seperated
Rafael Moreno
@ralphie9224
Apr 20 2015 14:59
should I go back into dgrandomprimes and change everything I declared as mpz_class to the integer class you made?
Sam Gwydir
@gwydirsam
Apr 20 2015 15:00
no those things are fine as is probably
the point of dg<whatever> is to encapsulate all the mpz_class stuff
Rafael Moreno
@ralphie9224
Apr 20 2015 15:00
ok. so just use the dg ness in the new classes?
Sam Gwydir
@gwydirsam
Apr 20 2015 15:00
we should probably only return dgrandomprimes or from those functions though
yeah...
for now use mpz_class
later today we can try refactoring for that
Rafael Moreno
@ralphie9224
Apr 20 2015 15:01
ok cool
Sam Gwydir
@gwydirsam
Apr 20 2015 15:02
I sort of refactored your code to use it, but not all the way
like if you look at rsa-crypt-lib.cc
// generates two random primes and checks coprimality
mpz_class RsaCrypt::generate_key() {
  // sam: why are these set to 30?
  mpz_class p = dgrprime::generate_prime(30);
  mpz_class q = dgrprime::generate_prime(30);

  while (!is_coprime(p, q)) {
    q = dgrprime::generate_prime(30);
  }

  return p;
}
it's basically ready to switch over
but we can do that in lab or something
Rafael Moreno
@ralphie9224
Apr 20 2015 15:02
o. 30 is an arbitrary value btw
it looks better though
the refactored code.
not the 30
Sam Gwydir
@gwydirsam
Apr 20 2015 15:03
ok -- you should go through your code and name these magic constants
they're all over the place
for the most part I marked them
Rafael Moreno
@ralphie9224
Apr 20 2015 15:04
I shall
Sam Gwydir
@gwydirsam
Apr 20 2015 15:04
and for stuff like compute_theta_n, put the equation in a comment
Rafael Moreno
@ralphie9224
Apr 20 2015 15:06
ok
Sam Gwydir
@gwydirsam
Apr 20 2015 15:06
also you can use make -k all test-all to have it keep going when other tests fail
the -k means something like keep going
probably most importantly we need some expect_false tests for is_prime
Rafael Moreno
@ralphie9224
Apr 20 2015 15:08
just any arbitrary not prime numbers?
Sam Gwydir
@gwydirsam
Apr 20 2015 15:08
I guess so
just like a few small ones, then a few huge ones
and make sure they're not all even, otherwise you're only testing one of those early evenness tests
Rafael Moreno
@ralphie9224
Apr 20 2015 15:12
ok gotcha.
Rafael Moreno
@ralphie9224
Apr 20 2015 16:00
also @all I no longer have that poster presentation today, so if we want to meet at 3 then I will be there.