Tagged: library Toggle Comment Threads | Keyboard Shortcuts

  • CG 5:29 pm on December 29, 2008 Permalink | Reply
    Tags: , library   

    Which class to use? 

    This is the class structure of Crypto++ Library

    picture-1

    And then when I’m going to implement PK_Encryptor, which one to use???

    picture-2

    Which base class to use, when to implement, what scheme to choose? Still not clear which are the abstract classes. This library is superb but makes my head going to explode 😀

    Advertisements
     
    • Budi Rahardjo 10:57 pm on December 29, 2008 Permalink | Reply

      Unfortunately, I can’t tell just by looking at the pictures. Gotta dig deeper into the library, which I don’t have. ha ha ha.

      I suspect you have choices (of classes to use). Which one to choose? Well, I guess you have to understand all of them (at least at superficial level – why there are more than one ways to do it) or pick one and hope that it is the best for case at hand. 😀 ha ha ha.

    • CG 2:36 am on December 30, 2008 Permalink | Reply

      @BR: actually I already have examples of “optimal” implementation and i was digging out to find out how to implement it differently and trying to figure out the structure of the classes and surprised that the library provides tons of classes i don’t understand!

  • CG 2:15 am on November 17, 2008 Permalink | Reply
    Tags: , , library   

    Compiling Crypto++ 

    picture-3

    Has successfully compiled Crypto++ (pfffh, finally 😉 ). I made a very simple code (above), and standard g++ command for compiling did not work, until the library being installed to the library directory.

    Here’s how to install the crypto package:

    1. mkdir crypto
    2. mv cryptopp552.zip ./crypto
    3. cd crypto
    4. unzip cryptopp552.zip
    5. make
    6. sudo cp libcryptopp.a /usr/lib/
    7. sudo mkdir /usr/include/cryptopp
    8. sudo cp *.h /usr/include/cryptopp/

    Then compile it:

    g++ -lcryptopp cryptopptest.cpp

    And run it:

    ./a.out

    I decide to do some experiments using Crypto++ for the following reasons:

    1. It supports ECDSA, ECDH, ECIES
    2. It supports both binary and prime curves
    3. The library comes with domain parameters defined by NIST and SECG
    4. Great support for manipulating data
    5. Precomputation is supported
    6. Crypto++ is trying to receive NIST’s certification of ECDSA
     
    • Budi Rahardjo 7:51 am on November 17, 2008 Permalink | Reply

      Actually you don’t have to put all the libraries in the standard directory. You could use the “-L” switch for the library location and “-I” switch for the header location. For example, if your library and include files (header) are in “/home/cg/cryptolib”, that is the structure is something like this:

      /home/cg/cryptolib/include/*.h
      /home/cg/cryptolib/libcryptopp.a

      The compile command is like this:

      g++ -I/home/cg/cryptolib/include -L/home/cg/cryptolib cryptopptest.cpp -lcryptopp

      Have fun.

    • CG 9:37 am on November 17, 2008 Permalink | Reply

      @BR: what i did was totally different!

      g++ -L/Users/chika/Documents/CG/Library/Crypto++/ -lcryptoopp552 cryptopptest.cpp

      i didn’t know that i have to include the include dir 😀

    • tetangga@sebelah.com 11:52 am on November 17, 2008 Permalink | Reply

      walah…..pasti masih main digger ama pacman, jadi inget waktu zaman turbo c ….
      kapam mau mda
      walaupun bisa ngetik cepat sampai 120WPM tapi sebaiknya tenaga dan waktu di hemat, coba
      pekakas seperti make
      atau GBS

      tapi seperti biasa “A journey of a thousand miles begins with a single step”…..good job (gaya pak cris)

    • tetangga@sebelah.com 11:57 am on November 17, 2008 Permalink | Reply

      alah si ibu pasti masih main digger ama pacman, liat postingannya jadi inget zaman pake Borland Turbo C,
      kapan mau Model Driven Architecture nya 😛
      biar egak pegel ngetik coba pake make (http://www.gnu.org/software/make/) atau GBS (http://sources.redhat.com/autobook/)

    • tetangga@sebelah.com 12:01 pm on November 17, 2008 Permalink | Reply

      pake make atau GBS atuh

    • Budi Rahardjo 1:07 pm on November 17, 2008 Permalink | Reply

      nanti kalau udah kompleks baru pakai Makefile 😀

    • tetangga@sebelah.com 6:40 am on November 18, 2008 Permalink | Reply

      kalau bikin softwarenya compile driven 🙂 selalu komplek.
      mengetik “make” 100 kali per jam pasti lebih nyaman dibanding mengetik “g++ -I/home/cg/cryptolib/include -L/home/cg/cryptolib cryptopptest.cpp -lcryptopp” perjam :))

    • Kavita 4:41 pm on November 16, 2010 Permalink | Reply

      When I try to install cryptopp on gcc compiler it is saying the following error
      g++: cryptopptext.cpp : no such file or directory

      pls help me in this regard

      Kavita

      • CG 9:32 am on November 17, 2010 Permalink | Reply

        have you followed the instructions above? check if it’s installed in the wrong directory.

  • CG 12:12 pm on November 13, 2008 Permalink | Reply
    Tags: library   

    Comparing cryptographic libraries 

    Luckily found a presentation titled “A Survey of Cryptographic Libraries supporting Elliptic Curve Cryptography”, and start filling in the table of library comparation.

    picture-12

    Next step is to decide which library (ies) to use. Crypto++, LibTomCrypt and Bouncy Castle have already explored.

     
  • CG 7:14 pm on November 6, 2008 Permalink | Reply
    Tags: , library   

    Is Java Crypto faster than C/C++? 

    One of the best IT expert and programmer I’ve ever known, suggests me to try Java for implementing crypto. He gave me lots of links and books, and now I’m going to explore more about crypto programming with Java and its library.

    Java and Eclipse have been downloaded and installed!

     
    • waskita 1:11 pm on November 12, 2008 Permalink | Reply

      ditunggu hasil implementasinya

    • CG 1:46 pm on November 12, 2008 Permalink | Reply

      @waskita: belum siap implementasi, masih mau bikin array perbandingan dulu untuk setiap library.

    • Budi Rahardjo 10:24 pm on November 12, 2008 Permalink | Reply

      Masalahnya adalah … belum ada satu library komplit yang bisa diambil modul-modulnya untuk keperluan percobaan (reconfigurable), baik dalam bahasa C/C++ maupun Java. Bisa jadi Java lebih cepat dari C (atau sebaliknya) tetapi itu belum tepat sasaran karena kayaknya tetap saja harus buat coding sendiri 🙂 [baik berupa library sendiri ataupun extend library yang sudah ada].

      Intinya: masih tetap harus kerja keras! (Hey, kata siapa grad study itu gampang. hi3.)

    • waskita 1:29 pm on November 13, 2008 Permalink | Reply

      asal jangan lama-lama, nanti jadi kayak gini: http://www.phdcomics.com/comics/archive.php?comicid=408

  • CG 2:35 am on November 5, 2008 Permalink | Reply
    Tags: library   

    Crypto Library: LibTomCrypt 

    picture-4

    Going to explore this library, it’s so true that the advantage of using a library is that it has been tested!

    Have just download the library here.

    [Started to enjoy reading ebooks 🙂 love highlighting and inserting notes on the .pdf file! 😀 ]

     
    • Budi Rahardjo 10:58 pm on November 5, 2008 Permalink | Reply

      hmm… kayaknya menarik juga membaca eBooks pakai Preview ya? harus dicoba nih. bakalan seru dengan highlighternya. (malah keasyikan dengan highlighternya. bisa-bisa seluruh buku jadi berwarna semua. ha ha ha.)

      kayaknya librarynya harus dicoba juga. nampaknya harus switch dari platform ms windows nih…

    • CG 2:24 am on November 6, 2008 Permalink | Reply

      @BR wah iyaaaa, ternyata praktis juga pake e-book karna kalau mau search tinggal ketik di spotlight. trus tinggal di bookmark biar ga lupa2x lagi halaman2x yang penting trus bisa insert2x notes di samping2xnya, iihhh seru!

      library akan segera di explore, bukunya udah tamat di scan malem ini. ternyata hanya berisi modul2x untuk operasi big int. implementasi cryptosystemnya ga tau ada atau ga ya? lihat dulu di lib-nya. kalau ga ada berarti balik pake CryptoLib. tapi dia pake C++ bukan C

      halah, udah jelas atuh switch dari ms windows mah harus :))

    • Budi Rahardjo 5:38 am on November 6, 2008 Permalink | Reply

      memang ada dua alternatif:
      (1) campuradukkan library (pick the cream of the crop – ambil yang terbaik);
      (2) buat sendiri (tentunya dengan adaptasi yang sudah ada) – buat engine sendiri.

      masing-masing ada pro dan kontranya. pada prinsipnya memang kita harus buat tools yang komplit untuk melakukan pengujian-pengujian yang sudah direncanakan itu.

    • CG 8:35 am on November 6, 2008 Permalink | Reply

      @BR: kalau begini boleh ga:
      cobain library2x ambil yang perlu (kalau bisa diintegrasi), tentu saja perlu waktu cukup lama. kalau masih sempet dan gak keburu gila, bikin sendiri :))

      soalnya rada serem sama debuggingnya kalau bikin sendiri 😦

  • CG 7:10 pm on November 4, 2008 Permalink | Reply
    Tags: library   

    Library: use, or create? 

    Had a short discussion with an expert in software engineering this afternoon, and he suggested that using library is saving more time and more efficient than developing our own. The learning curve of learning a library will be high but it’s gonna worth it.

    Those who don’t know how to use a library, wouldn’t know how to create one

    Hi hi hi… sounds very make sense 😀

     
  • CG 7:27 pm on September 15, 2008 Permalink | Reply
    Tags: library, manual   

    Crypto Library Reference Manual 

    Have just downloaded the reference manual!

    The advisor/supervisor agrees with my plan to explore the library and its implementation.

    The deadline is 2 months from now.

     
    • Budi Rahardjo 4:27 am on September 19, 2008 Permalink | Reply

      yeah. give it a spin but also give it a time frame. if by that time you don’t get anything out of it, drop it and go back to the previous library.

    • chikaradirghsa 11:59 am on September 19, 2008 Permalink | Reply

      @BR: previous lib = the lib with the toy problem?

    • mehobbes 7:27 pm on September 19, 2008 Permalink | Reply

      kelihatannya crypto semakin asik nih.
      saya jadi terpengaruh untuk ikut belajar crypto.
      tidak keberatan kan kalo nanti kita diskusi?

      n.b. saya perhatikan sekarang WP-nya mulai ada gambar 🙂
      ada satu hal yang ingin saya tanya.
      huruf C dan G nya seperti di-highlight?
      apa ada arti khusus?
      mungkin C singkatan dari chikaradirghsa? atau crypto?
      G-nya apa?
      just curious.

    • Abdurahman 7:40 pm on September 22, 2008 Permalink | Reply

      hi, nice blog 🙂

      pure technical..
      so rare to find this kind of blog 🙂

      ~nice to know you~

    • chikaradirghsa 9:51 pm on September 22, 2008 Permalink | Reply

      @abdurahman: hey, thx for stopping by. nice and technical blogs of yours too 🙂

    • tetangga sebelah 1:23 pm on September 24, 2008 Permalink | Reply

      Sebenarnya pingin share gimana cara aku membaca lib/code yang besar…..tapi……u use mac…..I don’t know any mac application that able to help in code reading…but here is window and unix app that worth to try

      StarUML —> use this tool to reengineer the code to UML Class diagram….class diagram will help you to understand overall picture of the code. if u feel StarUML too slow, use Entreprise Achitect 7. generate some error but diagram still worth to learn.

      after you understand the big picture of the code, you may use Understand from http://www.scitools.com or source navigator from http://sourcenav.berlios.de/ to understand details

      again I sorry no mac applications…..mac is nice computer but I never consider it fits serious programmer needs

    • tetangga sebelah 2:21 pm on September 24, 2008 Permalink | Reply

    • chikaradirghsa 4:58 pm on September 24, 2008 Permalink | Reply

      @tetangga sebelah: aaaaaaaaa, thankyou! you’ve always been a BIG help! bikinnya kok bisa cepet dan bagus gitu man? pake rational rose?
      lu mudik jangan lama2x sia, gue pengen tanya2x!

    • tetangga sebelah 10:32 pm on September 24, 2008 Permalink | Reply

      lah kan dijelasin diatas….kalau ibu punya windows….aku bisa kasih softwarenya….jadi belajar bisa lebih cepat…itu dibikin pake understand 2.0.
      kalau di mac mungkin bisa download source navigator terus
      compile-compile sendiri,
      debug-debug sendiri,
      pake-pake sendiri,
      mac emang riweuh….

    • chikaradirghsa 10:45 pm on September 24, 2008 Permalink | Reply

      @tetangga sebelah: ga sopan sia, bilang2x mac riweuh… hi hi hi
      i’ll find my own way to make it work on mac, eventually! 😉

    • tetangga sebelah 10:58 pm on September 24, 2008 Permalink | Reply

      I was big fans of mac, I love very much my G-X processor and it’s OS, when I used storyboard, mac was unbeatable, graphic editing mac was excellent. code simple c application you will notice mac starting to leave you, code multi-platform C++ application you’ll like alone, code enterprise Java application mac will say “sorry we are not in the same zip code” 😛
      I can create mac application in Windows or Linux, but likewise is not true.

    • chikaradirghsa 11:26 pm on September 24, 2008 Permalink | Reply

      @tetangga sebelah: i’ve been coding c/c++ (and java once a while) using codeblocks and xcode, and everything seems to be just fine with mac!
      for now, i only need c/c++ works for my crypto programming, which won’t be like coding enterprise, i suppose?

    • mehobbes 6:42 pm on November 4, 2008 Permalink | Reply

      kalau melihat judulnya sekarang sudah ganti jadi ‘the CG – unsolved’,
      berarti komentar saya di atas tidak salah.
      CG ada artinya ya? 😀

  • CG 4:27 pm on September 14, 2008 Permalink | Reply
    Tags: big endian, integer, library, little endian, ,   

    Big Endian/Little Endian? 

    There are at least three big things I have to work on to develop a crypto library of my own.

    1. Configuration of hardware (little endian/big endian? internal cache? memory leak? word size? word type? compiler? backward compability? data type used? OS features?)
    2. Integer and it’s basic arithmetics (ring? group? Euclidean domain? Quotient ring?).
    3. The library I’m referring to is using C++, thus to understand the inner workings I need to understand the class hierarchy. It uses A LOT of abstract classes!

    Oh well… 😀

     
    • tetangga sebelah 9:16 pm on September 15, 2008 Permalink | Reply

      wahhhh banyak banget masalah yang dicarinya bu, hidup itu udah susah kho dibikin susah…..
      andaikan aku bisa bantu….. 😦
      sebagai penghibur, aku mau ngasih buku judul buku yang bagus jika mau baca kode orang (open source)
      coba baca code reading

      terus kenapa mikirin hierarchy. cara terbaik memahami kode yang hierarchy adalah baca yang hierarchy yang paling rendah….karena sudah mewakili semua yang diatasnya.
      ter akhir…….semangatttttt

    • chikaradirghsa 9:29 pm on September 15, 2008 Permalink | Reply

      @tetangga sebelah: bantu atuh minimal dengan doa, atau sebotol orange water dingin untuk buka puasa setelah jogging 😛

      manaaaaaaaa??? mana atuh bukunya? mauuuuu!!!

      ga ngerti. gimana maksudnya hierarchy paling rendah?

  • CG 1:05 pm on July 17, 2008 Permalink | Reply
    Tags: , , library,   

    Boosting my coding with Boost Library 

    Reading books about how to use Boost Library. Will take some time but certainly will save more time than developing all the modules from the scratch.

    Got the feeling that once I advance metaprogramming then it will come in handy when I need it.

     
    • tetangga sebelah 8:22 pm on July 17, 2008 Permalink | Reply

      hehe…ada saya punya kabar buruk dan kabar baik tentang metaprogramming,
      Kabar buruk: saya adalah orang yang sempet frustasi belajar metaprogramming, ceritanya begini, tahun 1999 dulu saya pernah diminta membuat sebuah aplikasi yang bisa menerjemahkan data dari berbagai sentral telepon, data sentral telepon tersebut selain banyak (5000 data/menit) juga sangat banyak variannya, tiap seri sentral punya format masing2, supaya saya lebih pusing user juga minta aplikasi yang saya buat bisa dikembangkan untuk mengenali jenis data baru tanpa harus diubah pada level coding…….dari sini akhirnya saya menyimpulkan harus membuat parser… usaha membuat parser ini membuat saya bertemu dengan binatang bernama metaprogramming, dan gurunya compiler (Mr. Joe of Bandung Polytechnic). menghabiskan waktu hampir 6 bulan saya berusaha belajar metaprogramming termasuk dari buku yg dipinjem dari mr. joe, dan saya gagal……saya tidak bisa menyelesaikan membuat parser dan waktu proyek sudah mempet. akhirnya saya ambil jalan singkat, saya gunakan pattern2 yang ada di buku http://www.amazon.com/Framework-Based-Software-Development-Programming-Methodologies/dp/0135333652/ref=sr_1_5?ie=UTF8&s=books&qid=1216299600&sr=8-5 dan saya gagal memahami metaprogramming.

      Kabar Baik: berdasarkan pengalaman kita bisa menggunakan boost dengan produktif tanpa harus memahami metaprogramming, cukup tahu make template semuanya lancar. template metaprogramming. kalau kita pingin mengembangkan boost baru kita sebaiknya ngerti metaprogramming karena dengan teknik metaprogramming code kita lebih bercita rasa (singkat tapi bikin lieur).

      beberapa tahun setelah kegagalan belajar metaprogramming di th 1999 saya membutuhkan lagi skill metaprogramming, belajar dari kesalahan sebelumnya ternyat saya menyimpulkan sebagai berikut:
      1. memahami code dgn teknik metaprogramming tidak akan berarti kita bisa mengembangkan/membuat code dengan teknik metaprogramming.
      2. Untuk bisa mengembangkan kode dengan teknik metaprogramming harus tahu bagaimana cara compiler bekerja dengan source code, karena metaprogramming itu adalah merayu (memanfaatkan) compiler supaya membuat code untuk kita. untuk memahami compiler C++ saya sangat dibantu oleh buku http://www.amazon.com/Annotated-C-Reference-Manual/dp/0201514591/ref=pd_bbs_sr_7?ie=UTF8&s=books&qid=1216298585&sr=8-7
      dan buku http://www.amazon.com/Inside-Object-Model-Stanley-Lippman/dp/0201834545/ref=sr_11_1?ie=UTF8&qid=1216299107&sr=11-1

      3. wilujeung lieur………..

    • chikaradirghsa 9:41 am on July 18, 2008 Permalink | Reply

      hyalah, nuhun pisan tipsnya! gue baru aja mau posting ttg metaprogramming.

      i will post it anyway, but now i know that i don’t have to understand metaprogramming to use boost templates, which is good!

    • yaniwid 10:05 am on July 18, 2008 Permalink | Reply

      Happy coding… Kalau sudah mulai biasanya lupa berhenti lho…

    • chikaradirghsa 12:34 pm on July 18, 2008 Permalink | Reply

      @yaniwid: ya bagus kalau lupa berhenti. biar cepet selesai codingnya 😉

  • CG 6:13 pm on July 15, 2008 Permalink | Reply
    Tags: , , library,   

    Graph Library – A First Trial 

    Have explored a bit through the graph library. Have read some documentation here, and here. The example worked fine.

    The library is using template. Need to learn more about it. Maybe from this book. Now reading this and this.

    Next task: developing a representation of simple grid-map in graph.

     
    • tetangga sebelah 12:36 pm on July 16, 2008 Permalink | Reply

      wah buku yang itu egak banyak jelasin Template bu, karena template itu illegal citizen of C++.

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel