Category Archives: Programming

Programming – C/C++, Java, Ksh, Python, ML

Hack Go – generate non-FIPS DSA key parameters using hacked Go compiler

Common DSA key parameter generation follow FIPS 186-3, which requires (L, N) bits length for P and Q, where L is at least 1024 and N is at least 160. However, sometimes we may want non-FIPS (L, N), for example, … Continue reading

Posted in Programming, Security | Tagged , , , | 1 Comment

byte order – Linux kernel byte order APIs

Most of the time, user-space applications do not care about the endian of the running machine, like we call send() and recv() directly expecting the right order of the data and they work! However, things could be changed if you … Continue reading

Posted in OS, Programming | Tagged , , | 2 Comments

ksig – sending signals from the kernel space to the user space

While syscall kill() gives users the ability to send certain signal to certain process in the user space of Linux, the story is totally different if we want to send signals from the kernel space to the user space. After … Continue reading

Posted in Dave's Tools, OS, Programming | Tagged , , , | Leave a comment

Book Recommendation – Building Probabilistic Graphical Models with Python

“Building Probabilistic Graphical Models with Python” is the 3rd book I have reviewed from PACKT publishing. It has just been released on this June. Compared to the classic book of PGM – “PGM: Principles and Techniques” by Dr. Koller, this … Continue reading

Posted in AI/ML, Programming | Tagged , , , , | Leave a comment

Python hacking – make ElementTree support line number

An easy way to parse XML in Python is using Python xml.etree.ElementTree, which parses the XML document/data into a tree structure, where each node is an Element object. Only within few lines of code, one can extract all the XML … Continue reading

Posted in Programming | Tagged , , , , | 16 Comments

crypto – use Linux kernel crypto API

Crypto is an important part of the Linux kernel source code. One can tell from the standalone crypto directory under the kernel source tree. Device drivers, file system and security all need crypto. This post does not help understand the … Continue reading

Posted in OS, Programming, Security | Tagged , , , , , | 2 Comments

vmrun – run your VMware VM without GUI

Virsh is my favorite cmdline for KVM management. You may wonder if there is sth similar for VMware or want to run VMware without GUI. Here is goes – vmrun. 0. VIX API VIX API allows users to automate the … Continue reading

Posted in Programming | Tagged , , | 8 Comments