<PAGE>   1
                                                                    Exhibit 10.4

                      SECURITY DYNAMICS TECHNOLOGIES, INC.

                        1994 EMPLOYEE STOCK PURCHASE PLAN

     The purpose of this Plan is to provide eligible employees of Security
Dynamics Technologies, Inc. (the "Company") and certain of its subsidiaries with
opportunities to purchase shares of the Company's Common Stock, $.01 par value
(the "Common Stock"). One Hundred Thousand (100,000) shares (after giving effect
to the Company's one-for-two reverse stock split effective as of October 24,
1994) of Common Stock in the aggregate have been approved for this purpose.

     1. Administration. The Plan will be administered by the Company's Board of
Directors (the "Board") or by a Committee appointed by the Board (the
"Committee"). The Board or the Committee has authority to make rules and
regulations for the administration of the Plan and its interpretation and
decisions with regard thereto shall be final and conclusive.

     2. Eligibility. Participation in the Plan will neither be permitted nor
denied contrary to the requirements of Section 423 of the Internal Revenue Code
of 1986, as amended (the "Code"), and regulations promulgated thereunder. All
employees of the Company, including directors who are employees, and all
employees of any subsidiary of the Company (as defined in Section 424(f) of the
Code) designated by the Board or the Committee from time to time (a "Designated
Subsidiary"), are eligible to participate in any one or more of the offerings of
Options (as defined below) to purchase Common Stock under the Plan, provided
that:

          (a) they are regularly employed by the Company or a Designated
     Subsidiary for more than 20 hours a week and for more than five months in a
     calendar year; and

          (b) they have been employed by the Company or a Designated Subsidiary
     for at least three months prior to enrolling in the Plan; and

          (c) they are employees of the Company or a Designated Subsidiary on
     the first day of the applicable Plan Period (as defined below).

     No employee may be granted an option hereunder if such employee,
immediately after the option is granted, owns 5% or more of the total combined
voting power or value of the stock of the Company or any subsidiary. For
purposes of the preceding sentence, the attribution rules of Section 424(d) of
the Code shall apply in determining the stock ownership of an employee, and all
stock which the

                                       -1-


<PAGE>   2

employee has a contractual right to purchase shall be treated as stock owned by
the employee.

     3. Offerings. The Company will make one or more offerings ("Offerings") to
employees to purchase Common Stock under this Plan. The Board or the Committee
shall determine the commencement dates of each of the Offerings (the "Offering
Commencement Dates"). Each Offering Commencement Date will begin a period (a
"Plan Period") during which payroll deductions will be made and held for the
purchase of Common Stock at the end of the Plan Period. The Board or the
Committee shall choose a Plan Period of twelve (12) months or less for each of
the Offerings and may, at its discretion, choose a different Plan Period for
each Offering.

     4. Participation. An employee eligible on the Offering Commencement Date of
any Offering may participate in such Offering by completing and forwarding a
payroll deduction authorization form to the Controller of the Company at least
14 days prior to the applicable Offering Commencement Date. The form will
authorize a regular payroll deduction from the Compensation received by the
employee during the Plan Period. Unless an employee files a new form or
withdraws from the Plan, his deductions and purchases will continue at the same
rate for future Offerings under the Plan as long as the Plan remains in effect.
The term "Compensation" means the amount of money reportable on the employee's
Federal Income Tax Withholding Statement, excluding overtime, shift premium,
incentive or bonus awards, allowances and reimbursements for expenses such as
relocation allowances for travel expenses, income or gains on the exercise of
Company stock options or stock appreciation rights, and similar items, whether
or not shown on the employee's Federal Income Tax Withholding Statement, but
including, in the case of salespersons, sales commissions to the extent
determined by the Board or the Committee.

     5. Deductions.

          (a) The Company will maintain payroll deduction accounts for all
participating employees. With respect to any Offering made under this Plan, an
employee may authorize a payroll deduction in any dollar amount up to a maximum
of 10% of the Compensation he or she receives during the Plan Period or such
shorter period during which deductions from payroll are made. Payroll deductions
may be at the rate of 1%, 2%, 3%, 4%, 5%, 6%, 7%, 8%, 9% or 10% of Compensation.

          (b) No employee may be granted an Option which permits his rights to
purchase Common Stock under this Plan and any other stock purchase plan of the
Company and its subsidiaries, to accrue at a rate which exceeds $25,000 of the
fair market value of such Common Stock (determined at the Offering Commencement
Date of the Plan Period) for each calendar year in which the Option is
outstanding at any time.

                                       -2-


<PAGE>   3

     6. Deduction Changes. An employee may decrease or discontinue his payroll
deduction once during any Plan Period by filing a new payroll deduction
authorization form. However, an employee may not increase his payroll deduction
during a Plan Period. If an employee elects to discontinue his payroll
deductions during a Plan Period, but does not elect to withdraw his funds
pursuant to Section 8 hereof, funds deducted prior to his election to
discontinue will be applied to the purchase of Common Stock on the Exercise Date
(as defined below).

     7. Interest. Interest will not be paid on any employee payroll deduction
accounts, except to the extent that the Board or its Committee, in its sole
discretion, elects to credit such accounts with interest at such per annum rate
as it may from time to time determine.

     8. Withdrawal of Funds. An employee may on any one occasion during a Plan
Period and for any reason withdraw all or part of the balance accumulated in the
employee's payroll deduction account. Any such withdrawal must be effected prior
to the close of business on the last day of the Plan Period. If the employee
withdraws all of such balance, the employee shall thereby withdraw from
participation in the Offering and may not begin participation again during the
remainder of the Plan Period. Any employee withdrawing all or part of such
balance may participate in any subsequent Offering in accordance with terms and
conditions established by the Board or the Committee, except that, unless
otherwise permitted under Section 16 of the Securities Exchange Act of 1934, as
amended (the "Exchange Act"), and the rules promulgated thereunder, any employee
who is also a director and/or officer of the Company within the meaning of
Section 16 of the Exchange Act may not (a) withdraw less than all of the balance
accumulated in such employee's payroll deduction account or (b) participate
again for a period of at least six months as provided in Rule 16b-3(d)(2)(i) or
any successor provision under the Exchange Act.

     9. Purchase of Shares.

          (a) On the Offering Commencement Date of each Plan Period, the Company
will grant to each eligible employee who is then a participant in the Plan an
option (an "Option") to purchase on the last business day of such Plan Period
(the "Exercise Date"), at the Option Price hereinafter provided for, such number
of whole shares of Common Stock of the Company reserved for the purposes of the
Plan as does not exceed the number of shares determined by dividing 15% of such
employee's annualized Compensation for the immediately prior six-month period by
the price determined in accordance with the formula set forth in the following
paragraph but using the closing price on the Offering Commencement Date of such
Plan Period.

          (b) The Option Price for each share purchased will be 85% of the
closing price of the Common Stock on (i) the first business day of such Plan
Period or

                                       -3-


<PAGE>   4

(ii) the Exercise Date, whichever closing price shall be less. Such closing
price shall be (A) the closing price of the Common Stock on any national
securities exchange on which the Common Stock is listed, or (B) the closing
price of the Common Stock on the Nasdaq National Market ("Nasdaq") or (C) the
average of the closing bid and asked prices in the over-the-counter market,
whichever is applicable, as published in The Wall Street Journal. If no sales of
Common Stock were made on such a day, the price of the Common Stock for purposes
of clauses (A) and (B) above shall be the reported price for the next preceding
day on which sales were made.

          (c) Each employee who continues to be a participant in the Plan on the
Exercise Date shall be deemed to have exercised his Option at the Option Price
on such date and shall be deemed to have purchased from the Company the number
of full shares of Common Stock reserved for the purpose of the Plan that his
accumulated payroll deductions on such date will pay for pursuant to the formula
set forth above (but not in excess of the maximum number determined in the
manner set forth above).

          (d) Any balance remaining in an employee's payroll deduction account
at the end of a Plan Period will be automatically refunded to the employee,
except that any balance which is less than the purchase price of one share of
Common Stock will be carried forward into the employee's payroll deduction
account for the following Offering, unless the employee elects not to
participate in the following Offering under the Plan, in which case the balance
in the employee's account shall be refunded.

     10. Issuance of Certificates. Certificates representing shares of Common
Stock purchased under the Plan may be issued only in the name of the employee,
in the name of the employee and another person of legal age as joint tenants
with rights of survivorship, or (in the Company's sole discretion) in the street
name of a brokerage firm, bank or other nominee holder designated by the
employee.

     11. Rights on Retirement, Death or Termination of Employment. In the event
of a participating employee's termination of employment prior to the last
business day of a Plan Period (whether as a result of the employee's voluntary
or involuntary termination, retirement, death or otherwise), no payroll
deduction shall be taken from any pay due and owing to the employee and the
balance in the employee's payroll deduction account shall be paid to the
employee or, in the event of the employee's death, (a) to a beneficiary
previously designated in a revocable notice signed by the employee (with any
spousal consent required under state law) or (b) in the absence of such a
designated beneficiary, to the executor or administrator of the employee's
estate or (c) if no such executor or administrator has been appointed to the
knowledge of the Company, to such other person(s) as the Company may, in its
discretion, designate. If, prior to the last business day of the Plan Period,
the Designated Subsidiary by which an employee is employed shall

                                       -4-


<PAGE>   5

cease to be a subsidiary of the Company, or if the employee is transferred to a
subsidiary of the Company that is not a Designated Subsidiary, the employee
shall be deemed to have terminated employment for the purposes of this Plan.

     12. Optionees Not Stockholders. Neither the granting of an Option to an
employee nor the deductions from his pay shall constitute such employee a
stockholder of the shares of Common Stock covered by an Option under this Plan
until such shares have been purchased by and issued to him.

     13. Rights Not Transferable. Rights under this Plan are not transferable by
a participating employee other than by will or the laws of descent and
distribution, and are exercisable during the employee's lifetime only by the
employee.

     14. Application of Funds. All funds received or held by the Company under
this Plan may be combined with other corporate funds and may be used for

any corporate purpose.

     15. Adjustment in Case of Changes Affecting Common Stock. In the event of a
subdivision of outstanding shares of Common Stock, or the payment of a dividend
in Common Stock, the number of shares approved for this Plan, and the share
limitation set forth in Section 9, shall be increased proportionately, and such
other adjustment shall be made as may be deemed equitable by the Board or the
Committee. In the event of any other change affecting the Common Stock (other
than the Company's one-for-two reverse stock split effective as of October 24,
1994), such adjustment shall be made as may be deemed equitable by the Board or
the Committee to give proper effect to such event.

     16. Merger.

          (a) If the Company shall at any time merge or consolidate with another
corporation and the holders of the capital stock of the Company immediately
prior to such merger or consolidation continue to hold at least 80% by voting
power of the capital stock of the surviving corporation ("Continuity of
Control"), the holder of each Option then outstanding will thereafter be
entitled to receive at the next Exercise Date upon the exercise of such Option
for each share as to which such Option shall be exercised the securities or
property which a holder of one share of the Common Stock was entitled to upon
and at the time of such merger, and the Board or the Committee shall take such
steps in connection with such merger as the Board or the Committee shall deem
necessary to assure that the provisions of Section 15 shall thereafter be
applicable, as nearly as reasonably may be, in relation to the said securities
or property as to which such holder of such Option might thereafter be entitled
to receive thereunder.

                                       -5-


<PAGE>   6

          (b) In the event of a merger or consolidation of the Company with or
into another corporation which does not involve Continuity of Control, or of a
sale of all or substantially all of the assets of the Company while unexercised
Options remain outstanding under the Plan, (i) subject to the provisions of
clauses (ii) and (iii), after the effective date of such transaction, each
holder of an outstanding Option shall be entitled, upon exercise of such Option,
to receive in lieu of shares of Common Stock, shares of such stock or other
securities as the holders of shares of Common Stock received pursuant to the
terms of such transaction; or (ii) all outstanding Options may be cancelled by
the Board or the Committee as of a date prior to the effective date of any such
transaction and all payroll deductions shall be paid out to the participating
employees; or (iii) all outstanding Options may be cancelled by the Board or the
Committee as of the effective date of any such transaction, provided that notice
of such cancellation shall be given to each holder of an Option, and each holder
of an Option shall have the right to exercise such Option in full based on
payroll deductions then credited to his account as of a date determined by the
Board or the Committee, which date shall not be less than ten (10) days
preceding the effective date of such transaction.

     17. Amendment of the Plan. The Board may at any time, and from time to
time, amend this Plan in any respect, except that (a) if the approval of any
such amendment by the stockholders of the Company is required by Section 423 of
the Code or by Rule 16b-3 under the Exchange Act, such amendment shall not be
effected without such approval, and (b) in no event may any amendment be made
which would cause the Plan to fail to comply with Section 16 of the Exchange Act
and the rules promulgated thereunder, as in effect from time to time, or Section
423 of the Code.

     18. Insufficient Shares. In the event that the total number of shares of
Common Stock specified in elections to be purchased under any Offering plus the
number of shares purchased under previous Offerings under this Plan exceeds the
maximum number of shares issuable under this Plan, the Board or the Committee
will allot the shares then available on a pro rata basis.

     19. Termination of the Plan. This Plan may be terminated at any time by the
Board. Upon termination of this Plan all amounts in the payroll deduction
accounts of participating employees shall be promptly refunded.

     20. Governmental Regulations.

          (a) The Company's obligation to sell and deliver Common Stock under
this Plan is subject to listing on a national stock exchange or quotation on
Nasdaq and the approval of all governmental authorities required in connection
with the authorization, issuance or sale of such stock.

                                       -6-


<PAGE>   7

          (b) The Plan shall be governed by the laws of the State of Delaware
except to the extent that such law is preempted by federal law.

          (c) The Plan is intended to comply with the provisions of Rule 16b-3
promulgated under the Exchange Act. Any provision inconsistent with such Rule
shall to that extent be inoperative and shall not affect the validity of the
Plan.

     21. Issuance of Shares. Shares may be issued upon exercise of an Option
from authorized but unissued Common Stock, from shares held in the treasury of
the Company, or from any other proper source.

     22. Notification upon Sale of Shares. Each employee agrees, by entering the
Plan, to promptly give the Company notice of any disposition of shares purchased
under the Plan where such disposition occurs within two years after the date of
grant of the Option pursuant to which such shares were purchased.

     23. Effective Date and Approval of Stockholders. The Plan shall take effect
upon the closing of the Company's initial public offering of Common Stock
pursuant to an effective registration statement under the Securities Act of
1933, as amended, subject to approval by the stockholders of the Company as
required by Rule 16b-3 under the Exchange Act and by Section 423 of the Code,
which approval must occur within twelve months of the adoption of the Plan by
the Board.

                                     Adopted by the Board of Directors on
                                     October 4, 1994

                                     Approved by the stockholders on October 24,
                                     1994

                                       -7-


<PAGE>   8

                                 Amendment No. 1

                                       to

                        1994 Employee Stock Purchase Plan

1. That the Company's 1994 Employee Stock Purchase Plan (the "Purchase Plan") be
amended to delete the phrase

     ", except that, unless otherwise permitted under Section 16 of the
     Securities Exchange Act of 1934, as amended (the "Exchange Act"), and the
     rules promulgated thereunder, any employee who is also a director and/or
     officer of the Company within the meaning of Section 16 of the Exchange Act
     may not (a) withdraw less than all of the balance accumulated in such
     employee's payroll deduction account or (b) participate again for a period
     of at least six months as provided in Rule 16b-3(d)(2)(i) or any successor
     provision under the Exchange Act"

appearing at the end of Section 8 of the 1994 Employee Stock Purchase Plan.

2. That the 1994 Employee Stock Purchase Plan be further amended to delete in
its entirety Section 13 thereof (pertaining to the nontransferability of rights
under the 1994 Employee Stock Purchase Plan) and to renumber the remaining
Sections of the 1994 Employee Stock Purchase Plan, and any and all cross
references thereto contained in the 1994 Employee Stock Purchase Plan,
accordingly.

3. That the 1994 Employee Stock Purchase Plan be further amended to define the
term "Exchange Act" first appearing in Section 17 of the 1994 Employee Stock
Purchase Plan (renumbered as Section 16 pursuant to the preceding resolution) as
"the Securities Exchange Act of 1934, as amended."

                                            Adopted by the Board of Directors on
                                            February 12, 1997