Random Wits

Life is too short for a diary

$ random wits
├── tags

├── bookshelf

├── resources

├── quotes

├── habits

└── about




Posts Tagged “projects”

Fri 10 Jan 2020

Connect to an Oracle Database using kerberos with python

Jobs failed! Screamed an automatic failure alert in email inbox. Existing python scripts were failing in the server which fetched data from Oracle database. I wondered if the credentials had changed.

After few emails back and forth with the Support team, I discoverd that the server had been upgraded with Kerberos authentication. I have to modify my scripts to support kerberos authentication. I have to dig up more to understand more about kerberos...

Continue reading → kerberos projects python docker oracle database



Sun 20 Mar 2016

Find kth largest element in an array

The other day I stumble upon the question to find the kth largest element in the array. At first glance, I thought the solution was trivial. But later I thought that there are multiple ways to achieve efficient solution

Heap is a useful data structure when root of the tree is important. Extracting an element from the heap is in logarithmic time. This could be used to find kth element from the array since finding maximum or minimum in heap is constant time...

Continue reading → algorithm ruby heap max-heap projects



Tue 16 Apr 2013

Encrypted Files in Minix 3

Implemented a new system call in Minix 3 along with the library function that allows it to be called conveniently from a C program. The library interface extends extends file access operations to handle encrypted files.

Reading and writing to a file is done through a system call. The first is to access the "master encryption table" file (/etc/encryptTable) that stores the information about every file that is encrypted within Minix and contains three pieces of information: fs_dev, inode_nr and hashed_pw. The first two information uniquely identifies what file is encrypted and can be obtained from the vnode for the file...

Continue reading → projects minix encrypted-files



Thu 28 Mar 2013

Binary Sempahore

Implemented binary semaphore in Minix 3. Minix 3 is a micro-kernel operating system.

Most of the process pass information among themselves using application IPC. This often result in race condition. To prevent it and provide synchronization, semaphores, first proposed by Dikstras, is used...

Continue reading → projects binary semaphore



Fri 02 Nov 2012

Advanced Encryption Standard (AES)

Advanced Encryption Standard, a symmetric key algorithm, implemented in C++. All the parties use the same key for encryption and decryption. It has superseded DES, another symmetric key algorithms.

Rijndael was selected by NIST (National Institute of Standards and Technology) as AES. Unlike Rijndael in which block length and key length can be specified to any multiple of 32 bits, AES fixes block length to 128 bits and key length to (128 or 192 or 256) bits...

Continue reading → projects aes



Tue 21 Aug 2012

Data Encryption Standard (DES)

Data Encryption Standard, a symmetric key algorithm, implemented in C++. All the parties use the same key for encryption and decryption. Look at the diagram below.

Here, m is message which is passed through an encrypted function E along with key K. The resultant is a unintelligent gibberish cipher. The cipher is decoded again using the same key to produce plain message...

Continue reading → projects des