Memory Bound Function - Using Memory Bound Functions To Prevent Spam

Using Memory Bound Functions To Prevent Spam

In 1992, IBM research scientists Cynthia Dwork and Moni Naor published a paper titled Pricing via Processing or Combating Junk Mail, suggesting a possibility of using CPU bound functions to deter abusers from sending spam. The scheme was based on the idea that computer users are much more likely to abuse a resource if the cost of abusing the resource is negligible: the underlying reason spam has become so rampant is that sending an e-mail has minuscule cost for spammers.

Dwork and Naor proposed that spamming might be reduced by injecting an additional cost in the form of an expensive CPU computation: CPU bound functions would consume CPU resources at the sender's machine for each message, thus preventing huge amounts of spam from being sent in a short period. The basic scheme that protects against abuses is as follows:

Let S be sender, R be recipient, and M be an e-mail. If R has agreed beforehand to receive e-mail from S, then M is transmitted in the usual way. Otherwise, S computes some function G(M) and sends (M, G(M)) to R. R checks if what it receives from S is of the form (M, G(M)). If yes, R accepts M. Otherwise, R rejects M. The figure on the right depicts cases in which there were no prior agreements:

The function G is selected such that the verification by R is relatively fast (taking a millisecond) and such that the computation by S is somewhat slow (involving at least several seconds). Therefore, S will be discouraged from sending M to multiple recipients with no prior agreements: the cost in terms of both time and computing resources of computing G repeatedly will become very prohibitive for a spammer who intends to send many millions of e-mails.

The major problem of using the above scheme is that fast CPUs compute much faster than slow CPUs. Further, higher-end computer systems also have sophisticated pipelines and other advantageous features that facilitate computations. As a result, a spammer with a state-of-the-art system will hardly be affected by such deterrence while a typical user with a mediocre system will be adversely affected. If a computation takes a few seconds on a new PC, it may take a minute on an old PC, and several minutes on a PDA, which might be a nuisance for users of old PCs, but probably unacceptable for users of PDAs. The disparity in client CPU speed constitutes one of the prominent roadblocks to widespread adoption of any scheme based on a CPU bound function. Therefore, researchers are concerned with finding functions that most computer systems will evaluate at about the same speed, so that high-end systems might evaluate these functions somewhat faster than low-end systems (2-10 times faster, but not 10-100 faster) as CPU disparities might imply. These ratios are “egalitarian” enough for the intended applications: the functions are effective in discouraging abuses and do not add a prohibitive delay on legitimate interactions, across a wide range of systems.

The new egalitarian approach is to rely on memory bound functions. As stated before, a memory bound function is a function whose computation time is dominated by the time spent accessing memory. A memory bound function accesses locations in a large region of memory in an unpredictable way, in such a way that using caches are not effective. In recent years, the speed of CPU has grown drastically, but there has been comparatively small progress in developing faster main memory. Since the ratios of memory latencies of machines built in the last five years is typically no greater than two, and almost always less than four, the memory bound function will be egalitarian to most systems for the foreseeable future.

Read more about this topic:  Memory Bound Function

Famous quotes containing the words memory, bound, functions and/or prevent:

    I hid my love when young till I
    Couldn’t bear the buzzing of a fly;
    I hid my life to my despite
    Till I could not bear to look at light:
    I dare not gaze upon her face
    But left her memory in each place;
    Where’er I saw a wild flower lie
    I kissed and bade my love good-bye.
    John Clare (1793–1864)

    I’the commonwealth I would by contraries
    Execute all things; for no kind of traffic
    Would I admit; no name of magistrate;
    Letters should not be known; riches, poverty,
    And use of service, none; contract, succession,
    Bourn, bound of land, tilth, vineyard, none;
    No use of metal, corn, or wine, or oil;
    No occupation; all men idle, all,
    And women too, but innocent and pure.
    William Shakespeare (1564–1616)

    Empirical science is apt to cloud the sight, and, by the very knowledge of functions and processes, to bereave the student of the manly contemplation of the whole.
    Ralph Waldo Emerson (1803–1882)

    We are at war with the most dangerous enemy that has ever faced mankind in his long climb from the swamp to the stars, and it has been said if we lose that war, and in so doing lose this way of freedom of ours, history will record with the greatest astonishment that those who had the most to lose did the least to prevent its happening.
    Ronald Reagan (b. 1911)