Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. AES 128 block cipher problem running

AES 128 block cipher problem running

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialcsharphtmlasp-net
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 12972892
    wrote on last edited by
    #1

    Hi, I'm still a beginner in coding, I need block cipher source code for my research paper where I need to get the run time for mode of operation, I already find a lot of source code but none of it seems working, example the crypto++ . I don't even know how to set it up. if anyone could help me at least on how to run the crypto++ . and fyi im using a quad core processor laptop, windows 10 and visual studio 2015. :(( :(( :((

    this is the crypto++ I downloaded

    CPalliniC 1 Reply Last reply
    0
    • U User 12972892

      Hi, I'm still a beginner in coding, I need block cipher source code for my research paper where I need to get the run time for mode of operation, I already find a lot of source code but none of it seems working, example the crypto++ . I don't even know how to set it up. if anyone could help me at least on how to run the crypto++ . and fyi im using a quad core processor laptop, windows 10 and visual studio 2015. :(( :(( :((

      this is the crypto++ I downloaded

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      You could use Microsoft Crypto API. They provide documentation and examples: Using Cryptography (Windows)[^].

      In testa che avete, signor di Ceprano?

      R 1 Reply Last reply
      0
      • CPalliniC CPallini

        You could use Microsoft Crypto API. They provide documentation and examples: Using Cryptography (Windows)[^].

        R Offline
        R Offline
        Razvan Cristian
        wrote on last edited by
        #3

        Hi here you go: The header file, aes.h:

        #ifndef AES_H
        #define AES_H

        #include #include using namespace std;

        class aes
        {
        public:
        aes(vector& , vector&, unsigned int);
        ~aes();
        vector encrypt();
        vector dencrypt();
        private:
        bool debugg = false;
        vector str_key;
        vector > KEY;
        vector > KEY_SCHEDULE;
        vector str_io;
        vector > INPUT, OUTPUT;
        unsigned int KEY_LENGHT;
        unsigned int ROUNDS;
        unsigned int GROUP_SIZE;
        unsigned int BLOCK_SIZE = 16;

        //variabile
        static const unsigned char sbox\[256\];
        static const unsigned char isbox\[256\];
        static const unsigned char srcon\[256\];
        static const unsigned char by\_2\[256\];
        static const unsigned char by\_3\[256\];
        static const unsigned char by\_9\[256\];
        static const unsigned char by\_11\[256\];
        static const unsigned char by\_13\[256\];
        static const unsigned char by\_14\[256\];
        
        //functii
        void getKeyFromString(vector&);
        void gen\_key\_schedule(vector >&);
        vector x\_xor(vector, vector);
        vector g(vector&, unsigned int);
        void subytes(vector >&);
        void isubytes(vector >&);
        vector subytesWord(vector&);
        void debug(vector >&);
        
        void dgetInputFromString(vector&);
        vector > beginEcryptForBlock(vector >&);//beginDEcryptForBlock
        vector > beginDEcryptForBlock(vector >&);
        void addRound(vector >&, vector >&);
        void getWFrmKeySched(unsigned int, vector >&);
        void shiftRows(vector >&, vector&, vector&, vector&);
        void ishiftRows(vector >&, vector& , vector& , vector& );
        void mixCol(vector >&);
        void imixCol(vector >&);
        unsigned int getNextByte(unsigned int, unsigned int);
        void populateVector4x4(vector >&);
        

        };

        #endif // AES_H

        The cpp file , aes.cpp:

        #include "aes.h"
        #include
        #include
        #include

        us

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups