The president has acknowledged sometimes using public statements about negotiations and military planning to keep adversaries off guard.