I am implementing Hill cipher depending on the explanation Wikipedia
But I want to implement it using CBC mode, which says that each block must be XORed with the previous block, what about the first block, how it will be ?.
B.S. each block is a 3-elemnents block
In CBC mode, you need an additional initialization vector, to have something you can XOR the first block with. Simply generate n random bytes that will serve as your IV (where n is your block size). This IV need not to be kept secret and can be transmitted in public to the receiver who would then use it again to decrypt the message.