# secd, the daemon that holds the keychain

> The daemon behind your keychain: runs as you not root, eight Mach doors, SQL it prints in its own logs, 86 percent of one window's traffic from a single app, 34 seconds of CPU a day.

Source: https://www.ribbonmac.com/guides/secd-mac · Updated 2026-11-19

You opened Activity Monitor because something felt slow, sorted by the CPU column, and found a four letter stranger near the top. Not a name any app ever shows you. Just secd, quiet, unexplained, holding a double digit percentage while you watch.

It is the daemon behind every password your Mac remembers. This page is a measurement of it on a Mac running macOS 27.0.1 with 29 days of uptime: every fact below was read off the system, nothing installed, nothing written.

## Two sentences of documentation, since 2016

For a daemon that guards every secret on the machine, the manual page is strikingly calm:

```
SECD(8)              System Manager's Manual              SECD(8)

NAME
     secd - centralised keychain agent

DESCRIPTION
     secd controls access to and modification of keychain items.
     Anyone who needs to use the keychain will be talking to this
     LaunchAgent.

macOS 27.0          November 2, 2016                     SECD(8)
```

A name, two sentences, and a date ten years old. Note the word choice: controls access to and modification of. Not stores, not encrypts. Controls access. The keychain files exist somewhere on disk, and this process decides, per query, who gets to read what. It is a gatekeeper that also runs the vault.

## Two daemons, one inheritance

Type `launchctl print gui/$(id -u)/com.apple.secd` and launchd answers: could not find service. The daemon holding your keychain is not in your graphical session's domain at all. Its launch file limits it to two session types, Background and CryptexContainer, so it lives one level down, in the user domain, and that is where launchd's report finds it: running, pid 1006, and a runs count of 1, which means it has been alive without interruption since you logged in, 29 days ago on this machine.

And it runs as you. Not root. The process list shows the split plainly: /usr/sbin/securityd under root, and /usr/libexec/secd under your own account. When Apple divided the old security server, the root half kept the famous name and the system wide duties, and your half, the half that actually touches your passwords, became secd.

The launch file never got the memo. It is labelled com.apple.secd, and every single thing inside it still says securityd:

```
MachServices => {
    com.apple.securityd.general        => true
    com.apple.securityd.xpc            => true
    com.apple.securityd.aps            => true
    com.apple.securityd.ckks           => true
    com.apple.securityd.sos            => true
    com.apple.securityd.octagon        => true
    com.apple.security.escrow-update   => true
    com.apple.security.kcsharing       => true
}
LaunchEvents => {
    com.apple.xpc.activity => {
        com.apple.securityd.daily    { Interval 86400,  Utility }
        com.apple.securityd.weekly   { Interval 604800, Maintenance,
                                       RequireInexpensiveNetworkConnectivity }
        com.apple.securityd.prng     { Interval 3600,   Maintenance }
        com.apple.securityd.entropyhealth { Interval 86400, Utility }
    }
}
```

Eight doors and four clocks. The general and xpc doors are the everyday keychain traffic. ckks is CloudKit Key Sync, the pipe to iCloud Keychain. kcsharing is keychain sharing with other people. escrow-update and sos are the recovery plumbing, the machinery that lets you restore your keychain onto a new Mac. Octagon is Apple's own name for the sync circle your devices form, and it is not just a string here: the logs show it at work, 21 octagon rows and an octagonpush in a 45 minute window.

The clocks are the quiet part of the job. The weekly activity carries a flag you can almost hear: RequireInexpensiveNetworkConnectivity. The sync only runs on a connection the system considers unmetered. And one clock ticks hourly, maintenance priority: com.apple.securityd.prng. A keychain full of secrets is only as strong as its random numbers, so once an hour, the daemon checks the randomness source itself, and once a day it checks the entropy supply. The vault audits its own locks.

## A database that quotes its own SQL

Where sysmond on this same machine went six hours without logging a word, secd printed 2,830 lines in 45 minutes, and it does not talk in vague states. It talks SQL. Here is one line from the log, verbatim:

```
Returning 25 items for query: SELECT rowid, data, agrp FROM genp
WHERE agrp=? AND acct=? AND type=? AND sync=? AND tomb=? AND musr=?
AND agrp IN (?) for access group:
UBF8T346G9.com.microsoft.identity.universalstorage
```

That line answers a question most keychain guides wave at. The keychain is not a mystery format. It is a SQLite database, and the daemon queries it like any database. The binary's own strings carry the table set: genp for generic passwords, inet for internet passwords, cert for certificates, keys for keys. In the measured window, 73 queries hit genp and 12 hit inet.

The same line names the asker. Every query arrives stamped with an access group, the ten character team identifier plus the app's own namespace, and the 45 minute window reads like a customer list: the office suite's identity storage, 73 queries, the built in password manager, six, network code, three. One app, 86 percent of the traffic. And it fetched the same 25 items three times in the same second, timestamps identical to the millisecond, which is not a problem, just a client being thorough, and is precisely the shape secd's CPU column takes when something starts looping.

Even the launch file admits the database. Its one environment variable, DEBUGSCOPE, ships with a value that is just a list of the daemon's internal debug channels, read verbatim: policy, trust, bind, profile, trace, dbconn, OTR, serverxpc, sqlite3, error_thee_well, ringSigning. Two of those words are receipts. sqlite3, the storage engine. ringSigning, the cryptography of the sync circle. And one of them, error_thee_well, is somebody at Apple having a very long day in 2016.

## What it costs, and when it does not

The bill for guarding every secret on a busy Mac: 16 minutes 50 seconds of processor time across 29 days and 11 hours, about 34 seconds a day, on a machine whose office suite alone asked 73 questions in 45 minutes. In a quiet minute measured right after, it used no measurable CPU at all. The cost tracks the customers, exactly as a server should.

Memory tells the same story of a daemon that is handled. Resident size fell from 12.8 MB to 10 MB between two checks minutes apart, no restart, the pressured exit machinery trimming pages nobody was reading. launchd holds it under a soft jetsam limit of 50 MB regardless. The virtual size, about 466 GB, is the standard reserved address space habit of 64-bit daemons on this platform and means nothing by itself.

## See for yourself

Every fact above came from read only commands:

```
ps -Awwo pid,ppid,user,%cpu,rss,vsz,etime,time,comm | grep [s]ecd
man secd
plutil -p /System/Library/LaunchAgents/com.apple.secd.plist
launchctl print user/$(id -u)/com.apple.secd
log show --predicate 'process == "secd"' --last 45m
strings /usr/libexec/secd | grep -c keychain
```

Run the log line last, and give it a minute. The stream of queries will name every app you are signed into, one access group at a time. The stranger in the CPU column turns out to be the most trusted process on the machine: the one holding every password you have, telling nobody, not even the log, what any of them are.

## FAQ

### What is secd on my Mac?

It is the keychain agent, the process that actually stores and hands out everything saved in your keychains: website and app passwords, Wi-Fi secrets, secure notes, certificate requests, the tokens apps keep so you stay signed in. Its manual page, one of the few in this series, gives it two sentences and a title, centralised keychain agent, and the second sentence is the whole job description: Anyone who needs to use the keychain will be talking to this LaunchAgent. When the Passwords app lists your logins, when Safari offers a saved password, when an app quietly refreshes a token, the lookup and the answer both pass through secd. The searches that find this page, what is secd on mac, secd process, what is secd in activity monitor, are people who met the name in Activity Monitor with no introduction attached.

### Why is secd using high CPU?

Because some app is asking it a lot of questions. secd is a server: it wakes, runs a query against the keychain database, answers, waits. The measurement window on this Mac makes the mechanism plain. In 45 minutes, 85 database queries ran, and 73 of them, 86 percent, came from a single access group, the identity storage of one office suite, which fetched the same 25 items three times in the same second. That is what secd looking busy means: not the daemon misbehaving, but a client looping. The fix is on the client side. Sign the offending app out and back in, or quit it, and the CPU column falls. Killing secd itself buys you nothing, because the next password request respawns the conversation.

### Is secd the same thing as securityd?

They are two halves of one inheritance, and the launch file is the receipt. The plist that starts secd is labelled com.apple.secd, yet everything inside it still carries the old name: four scheduled activities called com.apple.securityd.daily, securityd.weekly, securityd.prng and securityd.entropyhealth, and eight Mach services under com.apple.securityd. When Apple split the security server, the root side kept the securityd name and the process at /usr/sbin/securityd, running as root since boot, and the per-user keychain work moved to secd, which runs as you. One holds the system's keys, the other holds yours.

### Is secd a virus or malware?

No. The genuine binary sits on the sealed system volume at /usr/libexec/secd, 13,101,568 bytes, a universal build carrying x86_64 alongside arm64e, signed by Apple under the identifier com.apple.secd with library validation on, platform identifier 26. There are no virus or malware rows anywhere in its search family, which fits a job whose worst symptom is a busy column next to a login prompt. The test is always the path: a process calling itself secd out of a downloads folder is a costume. The real one lives in /usr/libexec and nowhere else.

### Can I quit or disable secd?

You can, for about a second, and you will not enjoy what stops working. It serves eight Mach services, among them the general keychain door, iCloud Keychain sharing, and the escrow service that lets you recover your keychain, so quitting it takes out password autofill, saved Wi-Fi secrets and token refresh for every app on the Mac, and launchd restarts it on the next knock anyway. Its launch file enables pressured exit, meaning the system already reclaims its memory when it is idle, trimming resident size from 12.8 MB to 10 MB between two checks minutes apart with no restart. The memory management is handled. There is nothing to tune and nothing to gain.

### Why does secd use 466 GB of virtual memory?

It does not, and the number is not a leak. ps reports a virtual size of roughly 466 GB against a resident size of about 10 MB, which is the normal address space habit of a 64-bit macOS daemon, reserved mappings that will mostly never be touched, the identical shape the statistics daemon sysmond showed on the same machine. The number that is real is the ceiling: launchd holds secd under a soft jetsam memory limit of 50 MB. Try to hold more than that and the system reclaims it on purpose. The memory story is finished before you ever look at it.
