The Block Factorization Algorithm

|
Here is a simple semiprime (N=p*q) factorization algorithm with running time O((p-q)/2). It is based on the concept of N (p*q) unit blocks being arranged into a perfect rectangle. The rectangle has rows and columns. At the beginning of the algorithm, the rectangle's width and height are initialized to ~ ... Read More

f0 segfault recovery

|
When working outside the walled garden of byte code VMs and interpreted languages there is always the chance you might shoot yourself in the foot. This usually results in a segfault. As a courtesy, f0 can recover from segfaults. $ ./f0f0# 1 2 3 4We push some stuff on the ... Read More

Tracing Objective-C

| | objc, tracing
I don't know much about Objective-C and decided to get my learn on. Here are some discoveries I made.Objective-C is dynamic. Objects and classes support some degree of introspection at runtime. Methods / messages are routed and dispatched. They are not hardcoded addresses as in C++.Objective-C is message oriented. All ... Read More

Finding the Heap of an iPhone Application

| | core dump, heap, iPhone, Mobile
Often when doing mobile application assessments it is necessary to check that sensitive data is properly discarded when no longer in use. This data is often found on the heap. While it would be nice to dump core of a running process and strings/grep the dump this is tough on ... Read More

Python Prime Number Generator

| | primes
Here's an interesting prime number generator that I created. It avoids multiplication and modulo arithmetic. It does not sieve a preallocated set of integers (ex. find all primes up to N). You can serialize it and then resume generating (no need to specify an upper bound).Its internal state consists of ... Read More

Constraint Solvers

Lately, I've become interested in integer factorization and have been playing with constraint solvers. I started out with minion but quickly became frustrated. Minion does not support nesting of constraints or custom constraints from what I can tell. The set of equations I was working with were mostly comprised of ... Read More